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 committed Jan 17, 2025
1 parent 017f0c7 commit 0e9a9c3
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 @@ -244,7 +244,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 0e9a9c3

Please sign in to comment.