Skip to content

Commit

Permalink
Merge pull request #35353 from nextcloud/artonge/fix/cache_update_whe…
Browse files Browse the repository at this point in the history
…n_file_size_equal_0

Update cache when file size === 0
  • Loading branch information
artonge authored Nov 23, 2022
2 parents 9422d80 + 66ba90c commit bbc1f6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1191,13 +1191,13 @@ private function basicOperation($operation, $path, $hooks = [], $extraParam = nu
throw $e;
}

if ($result && in_array('delete', $hooks)) {
if ($result !== false && in_array('delete', $hooks)) {
$this->removeUpdate($storage, $internalPath);
}
if ($result && in_array('write', $hooks, true) && $operation !== 'fopen' && $operation !== 'touch') {
if ($result !== false && in_array('write', $hooks, true) && $operation !== 'fopen' && $operation !== 'touch') {
$this->writeUpdate($storage, $internalPath);
}
if ($result && in_array('touch', $hooks)) {
if ($result !== false && in_array('touch', $hooks)) {
$this->writeUpdate($storage, $internalPath, $extraParam);
}

Expand Down

0 comments on commit bbc1f6d

Please sign in to comment.