hi all,

I'm currently not on the list so please CC to me.

have you ever seen something like this?

Length: 653,854 [-159,202 to go] (unauthoritative)

          [ skipping 750K ]
  750K ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,,,,,,, ,,,,......125% @   3.48 KB/s

I have a very unreliable internet connection and therefore I use
wget a lot, but it also means I get a lot of these high percentages
reported. It only happens when the length is unauthoritative.

So I propose this patch to fix this so wget always reports the right
progress! It works for me, I never get percentages > 100% anymore!

-- cut here --
diff -urN wget-1.7.1/src/ftp.c wget-1.7.1-correctpercentage/src/ftp.c
--- wget-1.7.1/src/ftp.c        Fri Nov 16 20:38:03 2001
+++ wget-1.7.1-correctpercentage/src/ftp.c      Mon Dec 10 20:44:54 2001
@@ -868,6 +868,8 @@
       if (restval)
        logprintf (LOG_VERBOSE, _(" [%s to go]"),
                   legible (expected_bytes - restval));
+      /* set expected_bytes to correct value */
+      expected_bytes += restval;
       logputs (LOG_VERBOSE, _(" (unauthoritative)\n"));
     }
   timer = wtimer_new ();
-- until here --

rvd

Reply via email to