diff options
author | Robin Appelman <robin@icewind.nl> | 2019-09-25 18:07:32 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2019-09-25 18:09:45 +0200 |
commit | 733d4b6ccaeec30f931c23614b98013a1b2f674e (patch) | |
tree | 8df42f94e91c53423fbd301d911efb71d231b651 /lib | |
parent | 507eb30e1d7ab2ea31934796621cd6614c2af750 (diff) | |
download | nextcloud-server-733d4b6ccaeec30f931c23614b98013a1b2f674e.tar.gz nextcloud-server-733d4b6ccaeec30f931c23614b98013a1b2f674e.zip |
dont delete cache entries if deleting an object from object store failed
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index fbfbcfaa409..80f438d762c 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -161,7 +161,9 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { return false; } - $this->rmObjects($path); + if (!$this->rmObjects($path)) { + return false; + } $this->getCache()->remove($path); @@ -172,11 +174,17 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { $children = $this->getCache()->getFolderContents($path); foreach ($children as $child) { if ($child['mimetype'] === 'httpd/unix-directory') { - $this->rmObjects($child['path']); + if (!$this->rmObjects($child['path'])) { + return false; + } } else { - $this->unlink($child['path']); + if(!$this->unlink($child['path'])) { + return false; + } } } + + return true; } public function unlink($path) { |