Skip to content

Commit

Permalink
Only touch problematic rows
Browse files Browse the repository at this point in the history
Co-authored-by: Anna <anna@nextcloud.com>
Signed-off-by: simonspa <1677436+simonspa@users.noreply.github.com>
  • Loading branch information
simonspa and miaulalala authored Jan 18, 2023
1 parent 768436c commit 6856c38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Repair/RepairUnencryptedSize.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public function run(IOutput $output) {
$update = $this->connection->getQueryBuilder();
$update->update('filecache')
->set('unencrypted_size', "0")
->where($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT));
->where($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT)
->andWhere($update->expr()->neq('unencrypted_size', "0", IQueryBuilder::PARAM_INT);

if ($update->execute()) {
$output->info('Fixed file size of unencrypted files');
Expand Down

0 comments on commit 6856c38

Please sign in to comment.