diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-12-02 20:06:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-02 20:06:07 +0100 |
commit | 3e670cde9c8858ef0028abe2edd0f9dcdf99933d (patch) | |
tree | c18b06e5ee454f8a6247192efe82632360ab42d8 | |
parent | 72eb5d14e96c52f0698f4785025bf5520846aed9 (diff) | |
parent | b9ff7172f2654818fe90a0b78ac0b768a5526acc (diff) | |
download | nextcloud-server-3e670cde9c8858ef0028abe2edd0f9dcdf99933d.tar.gz nextcloud-server-3e670cde9c8858ef0028abe2edd0f9dcdf99933d.zip |
Merge pull request #2488 from nextcloud/update-cache-success-9
[9] 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 ce35e22197c..aee937920d1 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1108,13 +1108,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); } |