summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-12-02 16:20:49 +0100
committerRobin Appelman <robin@icewind.nl>2016-12-02 18:56:11 +0100
commitd84f88b04127189637c05c4759e78b846b877c2a (patch)
tree044d86527d0aaa7704c787dcc94f4fb83f57c705 /lib/private
parent6c1278c1ccf72c4df43d259f8f549dfaa28c9dda (diff)
downloadnextcloud-server-d84f88b04127189637c05c4759e78b846b877c2a.tar.gz
nextcloud-server-d84f88b04127189637c05c4759e78b846b877c2a.zip
only update the cache if the storage operation succeeds
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/View.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index ee6542216d2..397ff229328 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -1128,13 +1128,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);
}