diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-12-02 19:57:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-02 19:57:46 +0100 |
commit | 0acf914deaed796e137ed3b4e8196817084ff831 (patch) | |
tree | 0b04a78fa7d2f472c4811c1e9b5082c1917d1592 | |
parent | 535655e23c29932286e8d60e0b335d619bf5a3e6 (diff) | |
parent | efbe26f9c34bca2eb5f68d8bec45f1a9fd8a14cb (diff) | |
download | nextcloud-server-0acf914deaed796e137ed3b4e8196817084ff831.tar.gz nextcloud-server-0acf914deaed796e137ed3b4e8196817084ff831.zip |
Merge pull request #2480 from nextcloud/update-cache-success
only update the cache if the storage operation succeeds
-rw-r--r-- | lib/private/Files/View.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 3ce21a3489b..6facc7b9462 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1132,13 +1132,13 @@ class View { throw $e; } - if (in_array('delete', $hooks) and $result) { + if ($result && in_array('delete', $hooks) and $result) { $this->removeUpdate($storage, $internalPath); } - if (in_array('write', $hooks) and $operation !== 'fopen') { + if ($result && in_array('write', $hooks) and $operation !== 'fopen') { $this->writeUpdate($storage, $internalPath); } - if (in_array('touch', $hooks)) { + if ($result && in_array('touch', $hooks)) { $this->writeUpdate($storage, $internalPath, $extraParam); } |