[git commit master 1/1] wget: display 100% at the _end_ of chunked download

Denys Vlasenko vda.linux at googlemail.com
Fri Feb 11 22:06:21 UTC 2011


commit: http://git.busybox.net/busybox/commit/?id=88ad9da65ef6227e366a60b58be22c83bcf11c18
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/wget.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/networking/wget.c b/networking/wget.c
index 4ef5900..44eb4cf 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -556,9 +556,8 @@ static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd)
 		}
 #if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
 		clearerr(dfp);
-		ndelay_off(polldata.fd);
+		ndelay_off(polldata.fd); /* else fgets can get very unhappy */
 #endif
-
 		if (!G.chunked)
 			break;
 
@@ -572,6 +571,7 @@ static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd)
 		G.got_clen = 1;
 	}
 
+	G.chunked = 0; /* make progress meter show 100% even for chunked */
 	progress_meter(PROGRESS_END);
 }
 
-- 
1.7.3.4



More information about the busybox-cvs mailing list