Merge pull request #35369 from nextcloud/backport/35353/stable23

[stable23] Update cache when file size === 0
This commit is contained in:
blizzz 2022-11-23 21:11:23 +01:00 committed by GitHub
commit d74e2b68a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1179,13 +1179,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);
}