summaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorJulien Chaffraix <julien.chaffraix@gmail.com>2011-03-20 18:00:29 -0700
committerJulien Chaffraix <julien.chaffraix@gmail.com>2011-03-21 21:00:56 -0700
commit34ef39015e3064ca61f48428911ed6ce89738875 (patch)
tree9aec18bb3d2cafe3c63d554d2cc3da864d75f53e /lib/progress.c
parent252d70a1ed5e3ce3eea37952c89ba9fe75a7095c (diff)
downloadcurl-34ef39015e3064ca61f48428911ed6ce89738875.tar.gz
progress: don't print the last update on a separate line.
Curl_posttransfer is called too soon to add the final new line. Moved the new line logic to pgrsDone as there is no more call to update the progress status after this call. Reported by: Dmitri Shubin <sbn_at_tbricks.com> http://curl.haxx.se/mail/lib-2010-12/0162.html
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/progress.c b/lib/progress.c
index e0758f2a8..49047f1a6 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -137,6 +137,12 @@ void Curl_pgrsDone(struct connectdata *conn)
data->progress.lastshow=0;
Curl_pgrsUpdate(conn); /* the final (forced) update */
+ if(!(data->progress.flags & PGRS_HIDE) &&
+ !data->progress.callback)
+ /* only output if we don't use a progress callback and we're not
+ * hidden */
+ fprintf(data->set.err, "\n");
+
data->progress.speeder_c = 0; /* reset the progress meter display */
}