Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix unencrypted size calculation for files created before the Encrypt…
…ion storage is enabled

Signed-off-by: raul <[email protected]>
  • Loading branch information
Raudius authored and backportbot-nextcloud[bot] committed Oct 3, 2022
commit 7ed5679f2c015ea4f1bb5cd9668cee3e145a10c8
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