From fc9ab417edf20bb029fd1704403ab270508981c0 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 9 Jan 2022 17:31:44 +0200 Subject: [PATCH] run quota-recalc only if fsck fixed something --- api/src/Vfs/Sqlfs/Utils.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/src/Vfs/Sqlfs/Utils.php b/api/src/Vfs/Sqlfs/Utils.php index b1edf4fd32..5ceb09ff93 100644 --- a/api/src/Vfs/Sqlfs/Utils.php +++ b/api/src/Vfs/Sqlfs/Utils.php @@ -134,9 +134,11 @@ class Utils extends StreamWrapper } // also run quota recalc as fsck might have (re-)moved files - list($dirs, $iterations, $time) = Vfs\Sqlfs\Utils::quotaRecalc(); - $msgs[] = lang("Recalculated %1 directories in %2 iterations and %3 seconds", $dirs, $iterations, number_format($time, 1)); - + if (!$check_only && $msgs) + { + list($dirs, $iterations, $time) = Vfs\Sqlfs\Utils::quotaRecalc(); + $msgs[] = lang("Recalculated %1 directories in %2 iterations and %3 seconds", $dirs, $iterations, number_format($time, 1)); + } return $msgs; }