]> sjero.net Git - wget/blobdiff - src/progress.c
[svn] Don't calculate the ETA if nothing has yet been downloaded.
[wget] / src / progress.c
index 0f2e84d98a550d055989f688221a7c121e0b2b6d..33ccb7c9c465e358fc691ca50ee9f5c7753ae6de 100644 (file)
@@ -690,7 +690,7 @@ update_speed_ring (struct bar_progress *bp, long howmuch, double dltime)
   if (++hist->pos == DLSPEED_HISTORY_SIZE)
     hist->pos = 0;
 
-#if 1
+#if 0
   /* Sledgehammer check to verify that the totals are accurate. */
   {
     int i;
@@ -850,7 +850,7 @@ create_image (struct bar_progress *bp, double dl_total_time)
   /* " ETA xx:xx:xx"; wait for three seconds before displaying the ETA.
      That's because the ETA value needs a while to become
      reliable.  */
-  if (bp->total_length > 0 && dl_total_time > 3000)
+  if (bp->total_length > 0 && bp->count > 0 && dl_total_time > 3000)
     {
       long eta;
       int eta_hrs, eta_min, eta_sec;