diff options
Diffstat (limited to 'lib/Trash/TrashBackend.php')
-rw-r--r-- | lib/Trash/TrashBackend.php | 4 |
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()); |