Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
only update the cache if the storage operation succeeds
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Dec 2, 2016
commit efbe26f9c34bca2eb5f68d8bec45f1a9fd8a14cb
6 changes: 3 additions & 3 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1132,13 +1132,13 @@ private function basicOperation($operation, $path, $hooks = [], $extraParam = nu
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);
}

Expand Down