Correct progress bar on compression.

This commit is contained in:
2017-05-11 02:47:06 +01:00
parent aecbdf800f
commit 42dee66551
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2017-05-11 Natalia Portillo <claunia@claunia.com>
* Workers.cs:
Correct progress bar on compression.
2017-05-10 Natalia Portillo <claunia@claunia.com>
* Context.cs:

View File

@@ -929,7 +929,7 @@ namespace osrepodbmgr.Core
zipCounter++;
}
if(UpdateProgress != null && e.CurrentEntry != null)
if(UpdateProgress != null && e.CurrentEntry != null && e.EntriesTotal > 0)
UpdateProgress("Compressing...", e.CurrentEntry.FileName, zipCounter, e.EntriesTotal);
if(UpdateProgress2 != null)
UpdateProgress2(string.Format("{0:P}", e.BytesTransferred / (double)e.TotalBytesToTransfer),