mirror of
https://github.com/nextcloud/server.git
synced 2025-10-26 19:21:34 +00:00
Merge pull request #2480 from nextcloud/update-cache-success
only update the cache if the storage operation succeeds
This commit is contained in:
commit
0acf914dea
@ -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…
Reference in New Issue
Block a user