summaryrefslogtreecommitdiffstats
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 16:20:49 +0100
commitefbe26f9c34bca2eb5f68d8bec45f1a9fd8a14cb (patch)
tree9dea8b607fb1d7380b855829ec31ac14ff61fde3
parentdb56df18939fcdadd2b19ebab7db92a77e938c8d (diff)
downloadnextcloud-server-efbe26f9c34bca2eb5f68d8bec45f1a9fd8a14cb.tar.gz
nextcloud-server-efbe26f9c34bca2eb5f68d8bec45f1a9fd8a14cb.zip
only update the cache if the storage operation succeeds
Signed-off-by: Robin Appelman <robin@icewind.nl>
-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 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);
}