Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: don't error in getRelevantPaths if the root of the trash is passed
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and szaimen committed Jul 25, 2025
commit 913ad185235a18ed7a426f6df7ab8761c0e02aeb
7 changes: 6 additions & 1 deletion lib/ACL/ACLManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ private function getRelevantPaths(string $path): array {
$fromTrashbin = str_starts_with($path, '__groupfolders/trash/');
if ($fromTrashbin) {
/* Exploded path will look like ["__groupfolders", "trash", "1", "folderName.d2345678", "rest/of/the/path.txt"] */
[,,$groupFolderId,$rootTrashedItemName] = explode('/', $path, 5);
$parts = explode('/', $path, 5);
if (count($parts) < 4) {
// path is the root of the groupfolder trash
return [];
}
[, , $groupFolderId, $rootTrashedItemName] = $parts;
$groupFolderId = (int)$groupFolderId;
/* Remove the date part */
$separatorPos = strrpos($rootTrashedItemName, '.d');
Expand Down
Loading