Skip to content

Commit

Permalink
Do not obtain userFolder of a federated user
Browse files Browse the repository at this point in the history
Federated shares are somewhat special. So we can't move the files from
the main user and we should try to get it from the intialized root
already.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
  • Loading branch information
rullzer committed Jan 22, 2021
1 parent 9f81239 commit a098828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_trashbin/lib/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function shouldMoveToTrash($path) {
// check if there is a app which want to disable the trash bin for this file
$fileId = $this->storage->getCache()->getId($path);
$owner = $this->storage->getOwner($path);
if ($owner === false) {
if ($owner === false || $this->storage->instanceOfStorage(\OCA\Files_Sharing\External\Storage::class)) {
$nodes = $this->rootFolder->getById($fileId);
} else {
$nodes = $this->rootFolder->getUserFolder($owner)->getById($fileId);
Expand Down

0 comments on commit a098828

Please sign in to comment.