Merge pull request #35353 from nextcloud/artonge/fix/cache_update_when_file_size_equal_0

Update cache when file size === 0
This commit is contained in:
Louis 2022-11-23 15:51:29 +01:00 committed by GitHub
commit bbc1f6dbbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1191,13 +1191,13 @@ class View {
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);
}