Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/groupfolders.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Trash/TrashBackend.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Trash/TrashBackend.php b/lib/Trash/TrashBackend.php
index b0f04135..b5df6fbc 100644
--- a/lib/Trash/TrashBackend.php
+++ b/lib/Trash/TrashBackend.php
@@ -115,7 +115,9 @@ class TrashBackend implements ITrashBackend {
if ($node === null) {
throw new NotFoundException();
}
- $node->getStorage()->unlink($node->getInternalPath());
+ if ($node->getStorage()->unlink($node->getInternalPath()) === false) {
+ throw new \Exception('Failed to remove item from trashbin');
+ }
$node->getStorage()->getCache()->remove($node->getInternalPath());
if ($item->isRootItem()) {
$this->trashManager->removeItem($folderId, $item->getName(), $item->getDeletedTime());