Skip to content

Commit

Permalink
bugfix (was: division by zero if empty queue)
Browse files Browse the repository at this point in the history
  • Loading branch information
asdfjkl committed Apr 6, 2020
1 parent 7d730c7 commit 9cf9d7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions yahb/CopyModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions yahb/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

0 comments on commit 9cf9d7b

Please sign in to comment.