Skip to content

Commit b113833

Browse files
authored
Merge pull request #3588 from nextcloud/backport/3543/stable30
[stable30] fix: use owner instead of current user for move-to-trash logic
2 parents 1cf20c0 + f9cdc93 commit b113833

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
@@ -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)