diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-09-26 11:24:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-26 11:24:02 +0200 |
commit | 6ac67011f44c20ca88bc0b055a7aa727b16f9028 (patch) | |
tree | 55c1e03ec5f50b8ddff51af2aa88ba3cb9c9e352 /lib | |
parent | 472ce5cbcec3eeb4b811c3609a5d71de322c0888 (diff) | |
parent | 733d4b6ccaeec30f931c23614b98013a1b2f674e (diff) | |
download | nextcloud-server-6ac67011f44c20ca88bc0b055a7aa727b16f9028.tar.gz nextcloud-server-6ac67011f44c20ca88bc0b055a7aa727b16f9028.zip |
Merge pull request #17262 from nextcloud/objectstore-remove-cache-on-delete
dont delete cache entries if deleting an object from object store failed
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) { |