From 9467b9d557ac30c985e488adac76b8a485fdb76c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Tue, 12 May 2015 17:58:33 +0200 Subject: [PATCH] Feature #3759: Improve fsck log when there are 0 errors --- src/onedb/fsck.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/onedb/fsck.rb b/src/onedb/fsck.rb index b4b7bd773b..540254020c 100644 --- a/src/onedb/fsck.rb +++ b/src/onedb/fsck.rb @@ -1614,6 +1614,10 @@ EOT def log_error(message) @errors += 1 + log_msg(message) + end + + def log_msg(message) @log_file ||= File.open(LOG, "w") puts message @@ -1624,7 +1628,7 @@ EOT def log_total_errors() puts - puts "Total errors found: #{@errors}" + log_msg "Total errors found: #{@errors}" puts "A copy of this output was stored in #{LOG}" end