From 9d25a4f4176e2945fad5905072b78b9f7a321df7 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 11 Nov 2011 17:18:15 -0500 Subject: [PATCH] Fix to download percentange calculation --- src/com/gitblit/build/Build.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 + "%)"); } } -- 2.39.5