Skip to content

Commit 0e9a9c3

Browse files
committed
fix: use owner instead of current user for move-to-trash logic
fixes #3496 Signed-off-by: Robin Appelman <[email protected]>
1 parent 017f0c7 commit 0e9a9c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Trash/TrashBackend.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ public function moveToTrash(IStorage $storage, string $internalPath): bool {
244244
// ensure the folder exists
245245
$this->getTrashFolder($folderId);
246246

247-
$trashFolder = $this->rootFolder->get('/' . $user->getUID() . '/files_trashbin/groupfolders/' . $folderId);
247+
$owner = $storage->getOwner($internalPath);
248+
$trashFolder = $this->rootFolder->get('/' . $owner . '/files_trashbin/groupfolders/' . $folderId);
248249
$trashStorage = $trashFolder->getStorage();
249250
$time = time();
250251
$trashName = $name . '.d' . $time;

0 commit comments

Comments
 (0)