Skip to content

Commit f9cdc93

Browse files
icewind1991backportbot[bot]
authored andcommitted
fix: use owner instead of current user for move-to-trash logic
fixes #3496 Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 1cf20c0 commit f9cdc93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Trash/TrashBackend.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ public function moveToTrash(IStorage $storage, string $internalPath): bool {
242242
// ensure the folder exists
243243
$this->getTrashFolder($folderId);
244244

245-
$trashFolder = $this->rootFolder->get('/' . $user->getUID() . '/files_trashbin/groupfolders/' . $folderId);
245+
$owner = $storage->getOwner($internalPath);
246+
$trashFolder = $this->rootFolder->get('/' . $owner . '/files_trashbin/groupfolders/' . $folderId);
246247
$trashStorage = $trashFolder->getStorage();
247248
$time = time();
248249
$trashName = $name . '.d' . $time;

0 commit comments

Comments
 (0)