From fc8a2cb4b997c7eb2edd5b085934140b1755cd72 Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Tue, 4 Apr 2017 17:26:26 +0200 Subject: [PATCH] Improved the output from the verify option with both `--verbose` and without --- Duplicati/CommandLine/Commands.cs | 40 +++++++++++++++++-------------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/Duplicati/CommandLine/Commands.cs b/Duplicati/CommandLine/Commands.cs index 25aa20776..39dde6373 100644 --- a/Duplicati/CommandLine/Commands.cs +++ b/Duplicati/CommandLine/Commands.cs @@ -633,28 +633,32 @@ namespace Duplicati.CommandLine } else { - if (Library.Utility.Utility.ParseBoolOption(options, "verbose")) + var verbose = Library.Utility.Utility.ParseBoolOption(options, "verbose"); + foreach(var n in result.Verifications) { - foreach(var n in result.Verifications) + var changecount = n.Value.Count(); + if (changecount == 0) { - var changecount = n.Value.Count(); - if (changecount == 0) + if (verbose) Console.WriteLine("{0}: No errors", n.Key); - else - { - Console.WriteLine("{0}: {1} errors", n.Key, changecount); - foreach(var c in n.Value) - Console.WriteLine("{0}: {1}", c.Key, c.Value); - Console.WriteLine(); - } } - } - else - { - Console.WriteLine("Examined {0} files and found errors in the following files:", totalFiles); - foreach(var n in filtered) - Console.WriteLine(n.Key); - Console.WriteLine(); + else + { + Console.WriteLine("{0}: {1} errors", n.Key, changecount); + var count = 0; + foreach (var c in n.Value) + { + count++; + Console.WriteLine("\t{0}: {1}", c.Key, c.Value); + if (!verbose && count == 10 && changecount > 10) + { + Console.WriteLine("\t... and {0} more", changecount - count); + break; + } + } + + Console.WriteLine(); + } } return 3;