diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php index 7ae96f1b6b73c..936e6d646751c 100644 --- a/apps/files_trashbin/lib/Storage.php +++ b/apps/files_trashbin/lib/Storage.php @@ -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);