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:
@@ -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 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user