Skip to content

Commit

Permalink
fix: use owner instead of current user for move-to-trash logic
Browse files Browse the repository at this point in the history
fixes #3496

Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 authored and backportbot[bot] committed Feb 6, 2025
1 parent 1cf20c0 commit f9cdc93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Trash/TrashBackend.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,8 @@ public function moveToTrash(IStorage $storage, string $internalPath): bool {
// ensure the folder exists
$this->getTrashFolder($folderId);

$trashFolder = $this->rootFolder->get('/' . $user->getUID() . '/files_trashbin/groupfolders/' . $folderId);
$owner = $storage->getOwner($internalPath);
$trashFolder = $this->rootFolder->get('/' . $owner . '/files_trashbin/groupfolders/' . $folderId);
$trashStorage = $trashFolder->getStorage();
$time = time();
$trashName = $name . '.d' . $time;
Expand Down

0 comments on commit f9cdc93

Please sign in to comment.