only update the cache if the storage operation succeeds
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
72eb5d14e9
commit
b9ff7172f2
|
@ -1108,13 +1108,13 @@ class View {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_array('delete', $hooks) and $result) {
|
if ($result && in_array('delete', $hooks) and $result) {
|
||||||
$this->removeUpdate($storage, $internalPath);
|
$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);
|
$this->writeUpdate($storage, $internalPath);
|
||||||
}
|
}
|
||||||
if (in_array('touch', $hooks)) {
|
if ($result && in_array('touch', $hooks)) {
|
||||||
$this->writeUpdate($storage, $internalPath, $extraParam);
|
$this->writeUpdate($storage, $internalPath, $extraParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue