Skip to content

Commit

Permalink
Merge pull request #3588 from nextcloud/backport/3543/stable30
Browse files Browse the repository at this point in the history
[stable30] fix: use owner instead of current user for move-to-trash logic
  • Loading branch information
susnux authored Feb 6, 2025
2 parents 1cf20c0 + f9cdc93 commit b113833
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 b113833

Please sign in to comment.