From 9cf9d7b0aed577fc59428f798c44a82764da2e77 Mon Sep 17 00:00:00 2001 From: asdfjkl Date: Mon, 6 Apr 2020 15:20:20 +0200 Subject: [PATCH] bugfix (was: division by zero if empty queue) --- yahb/CopyModule.cs | 4 ++++ yahb/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/yahb/CopyModule.cs b/yahb/CopyModule.cs index 9a132af..6a7e7cb 100644 --- a/yahb/CopyModule.cs +++ b/yahb/CopyModule.cs @@ -376,6 +376,10 @@ public void doCopy() var sourceDestFiles = this.sourceFileList.Zip(this.destFileList, (a, b) => new { sourceFile = a, destFile = b }); int counter = 0; int cntAll = sourceDestFiles.Count(); + if(cntAll == 0) + { + cntAll = 1; + } int onePercent = (int) ((float) cntAll / 100.0); var watch = System.Diagnostics.Stopwatch.StartNew(); cfg.WriteProgressBar("copying files: ", "", 0); diff --git a/yahb/Properties/AssemblyInfo.cs b/yahb/Properties/AssemblyInfo.cs index 24f3a0a..02efe60 100644 --- a/yahb/Properties/AssemblyInfo.cs +++ b/yahb/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.3.0")] -[assembly: AssemblyFileVersion("1.0.3.0")] +[assembly: AssemblyVersion("1.0.4.0")] +[assembly: AssemblyFileVersion("1.0.4.0")]