Skip to content

Commit

Permalink
Fix unencrypted size calculation for files created before the Encrypt…
Browse files Browse the repository at this point in the history
…ion storage is enabled

Signed-off-by: raul <raul@nextcloud.com>
  • Loading branch information
Raudius committed Oct 3, 2022
1 parent 3db1f6d commit fa454bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Propagator.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function propagateChange($internalPath, $time, $sizeDifference = 0) {
$unencryptedSizeColumn = $builder->getColumnName('unencrypted_size');
$newUnencryptedSize = $builder->func()->greatest(
$builder->func()->add(
$builder->createFunction("CASE WHEN $hasUnencryptedSize THEN $sizeColumn ELSE $unencryptedSizeColumn END"),
$builder->createFunction("CASE WHEN $hasUnencryptedSize THEN $unencryptedSizeColumn ELSE $sizeColumn END"),
$builder->createNamedParameter($sizeDifference)
),
$builder->createNamedParameter(-1, IQueryBuilder::PARAM_INT)
Expand Down

0 comments on commit fa454bb

Please sign in to comment.