From: James Moger Date: Fri, 11 Nov 2011 22:18:15 +0000 (-0500) Subject: Fix to download percentange calculation X-Git-Tag: v0.7.0~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d25a4f4176e2945fad5905072b78b9f7a321df7;p=gitblit.git Fix to download percentange calculation --- diff --git a/src/com/gitblit/build/Build.java b/src/com/gitblit/build/Build.java index 80c88f30..43cd26f7 100644 --- a/src/com/gitblit/build/Build.java +++ b/src/com/gitblit/build/Build.java @@ -313,7 +313,7 @@ public class Build { lastProgress = progress; updateDownload(progress, targetFile); if (downloadListener != null) { - int percent = Math.round(100 * progress); + int percent = Math.min(100, Math.round(100 * progress)); downloadListener.downloading(mo.name + " (" + percent + "%)"); } }