mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
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
This commit is contained in:
parent
252d70a1ed
commit
34ef39015e
@ -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 */
|
||||
}
|
||||
|
||||
|
@ -1528,11 +1528,6 @@ CURLcode Curl_posttransfer(struct SessionHandle *data)
|
||||
(void)data; /* unused parameter */
|
||||
#endif
|
||||
|
||||
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");
|
||||
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user