Improved the output from the verify option with both --verbose and without
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user