]> source.dussan.org Git - gitblit.git/commitdiff
Fix to download percentange calculation
authorJames Moger <james.moger@gitblit.com>
Fri, 11 Nov 2011 22:18:15 +0000 (17:18 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 11 Nov 2011 22:18:15 +0000 (17:18 -0500)
src/com/gitblit/build/Build.java

index 80c88f30c95e1c52659f4754c9cb9f2ae915679c..43cd26f7d8107c78946723445a25218d06457a66 100644 (file)
@@ -313,7 +313,7 @@ public class Build {
                                                lastProgress = progress;\r
                                                updateDownload(progress, targetFile);\r
                                                if (downloadListener != null) {\r
-                                                       int percent = Math.round(100 * progress);\r
+                                                       int percent = Math.min(100, Math.round(100 * progress));\r
                                                        downloadListener.downloading(mo.name + " (" + percent + "%)");\r
                                                }\r
                                        }\r