Browse code

fix log message (bb#411)

git-svn: trunk@2959

Tomasz Kojm authored on 2007/03/21 04:54:55
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Tue Mar 20 19:02:13 CET 2007 (tk)
2
+---------------------------------
3
+  * freshclam/manager.c: fix log message (bb#411)
4
+
1 5
 Tue Mar 20 18:42:00 CET 2007 (tk)
2 6
 ---------------------------------
3 7
   * freshclam: release dbdir write-lock before notifying clamd (bb#401)
... ...
@@ -648,10 +648,13 @@ static int getfile(const char *srcfile, const char *destfile, const char *hostna
648 648
 	    return 57; /* FIXME */
649 649
 	}
650 650
 
651
+        if(totalsize > 0) {
652
+	    totaldownloaded += bread;
653
+            percentage = (int) (100 * (float) totaldownloaded / totalsize);
654
+	}
655
+
651 656
         if(!mprintf_quiet) {
652 657
             if(totalsize > 0) {
653
-                totaldownloaded += bread;
654
-                percentage = (int) (100 * (float) totaldownloaded / totalsize);
655 658
                 mprintf("Downloading %s [%3i%%]\r", srcfile, percentage);
656 659
             } else {
657 660
                 mprintf("Downloading %s [%c]\r", srcfile, rotation[rot]);