]> sjero.net Git - wget/blobdiff - src/retr.c
[svn] retr.c (fd_read_body): Pass total size to progress_create, not
[wget] / src / retr.c
index 6ea558fa49a36eb79e01695a114777df4c46169c..3415ff02d5feb3c3accf2996fc64c25fd389cdef 100644 (file)
@@ -224,9 +224,10 @@ fd_read_body (int fd, FILE *out, long toread, long startpos,
 
   if (opt.verbose)
     {
-      /* If we're skipping STARTPOS bytes, hide it from
-        progress_create because the indicator can't deal with it.  */
-      progress = progress_create (skip ? 0 : startpos, toread);
+      /* If we're skipping STARTPOS bytes, pass 0 as the INITIAL
+        argument to progress_create because the indicator doesn't
+        (yet) know about "skipping" data.  */
+      progress = progress_create (skip ? 0 : startpos, startpos + toread);
       progress_interactive = progress_interactive_p (progress);
     }