diff --git a/lib/private/Repair/RepairUnencryptedSize.php b/lib/private/Repair/RepairUnencryptedSize.php index be91934821185..08f4455a7d2d7 100644 --- a/lib/private/Repair/RepairUnencryptedSize.php +++ b/lib/private/Repair/RepairUnencryptedSize.php @@ -45,8 +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)) - ->andWhere($update->expr()->neq('unencrypted_size', "0", IQueryBuilder::PARAM_INT)); + ->where($update->expr()->gt('unencrypted_size', "0", IQueryBuilder::PARAM_INT)) + ->andWhere($update->expr()->eq('encrypted', "0", IQueryBuilder::PARAM_INT)); if ($update->execute()) { $output->info('Fixed file size of unencrypted files');