From 4e31a6ae7cee046dea7e4e3e16b5245cec6553df Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Fri, 30 Apr 2021 20:37:10 -0700 Subject: [PATCH] Don't crash if uploading a zero size file https://sourceforge.net/p/webadmin/bugs/5481/ --- uptracker.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uptracker.cgi b/uptracker.cgi index 7bfaee99d..1af99a7ec 100755 --- a/uptracker.cgi +++ b/uptracker.cgi @@ -84,7 +84,7 @@ while(1) { $last_time = $now; } - $pc = int(100 * $size / $totalsize) / 2; + $pc = $totalsize ? int(100 * $size / $totalsize) / 2 : 100; next if (defined($lastpc) && $pc == $lastpc); print "