Skip to content

Commit

Permalink
Merge pull request #45233 from nextcloud/fix/touch-propagate-size
Browse files Browse the repository at this point in the history
fix: Avoid updating size when calling touch on a file
  • Loading branch information
come-nc authored May 13, 2024
2 parents bf8b93e + 24e0d50 commit 2d40dae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,7 @@ private function basicOperation(string $operation, string $path, array $hooks =
$this->writeUpdate($storage, $internalPath, null, $isCreateOperation ? $sizeDifference : null);
}
if ($result !== false && in_array('touch', $hooks)) {
$this->writeUpdate($storage, $internalPath, $extraParam);
$this->writeUpdate($storage, $internalPath, $extraParam, 0);
}

if ((in_array('write', $hooks) || in_array('delete', $hooks)) && ($operation !== 'fopen' || $result === false)) {
Expand Down

0 comments on commit 2d40dae

Please sign in to comment.