Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 6e0d0bc

Browse files
Merge pull request #876 from github-for-unity/fixes/unzip-progress
Correcting progress updating
2 parents be2d230 + 9d2f1df commit 6e0d0bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/GitHub.Api/Helpers/Progress.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ public void UpdateProgress(long value, long total, string message = null)
7272
float fTotal = Total;
7373
float fValue = Value;
7474
Percentage = fValue / fTotal;
75-
float delta = fValue / fTotal - previousValue / fTotal;
76-
delta = delta * 100f / fTotal;
75+
var delta = (fValue / fTotal - previousValue / fTotal) * 100f;
7776

7877
if (Value != previousValue && (fValue == 0f || delta > 1f || fValue == fTotal))
7978
{ // signal progress in 1% increments or if we don't know what the total is

0 commit comments

Comments
 (0)