only update the cache if the storage operation succeeds

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/2480/head
Robin Appelman 10 years ago
parent db56df1893
commit efbe26f9c3
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
  1. 6
      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);
}

Loading…
Cancel
Save