mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +00:00
pscp: fix another newline problem in output.
In commit 54b300f15
, I managed to set the progress_bar_displayed flag
just _after_, rather than before, the call to abandon_progress_bar
that moves to the new line once the file has finished copying. So in
the case where a file is so small that the very first displaying of
the transfer statistics is already at 100% completion, the flag
wouldn't be set when abandon_progress_bar checked for it, and a
newline still wouldn't be printed.
This commit is contained in:
parent
5d6d052d8b
commit
dcb93d60e6
4
pscp.c
4
pscp.c
@ -576,11 +576,11 @@ static void print_stats(const char *name, uint64 size, uint64 done,
|
|||||||
printf("%*s", prev_stats_len - len, "");
|
printf("%*s", prev_stats_len - len, "");
|
||||||
prev_stats_len = len;
|
prev_stats_len = len;
|
||||||
|
|
||||||
|
progress_bar_displayed = TRUE;
|
||||||
|
|
||||||
if (uint64_compare(done, size) == 0)
|
if (uint64_compare(done, size) == 0)
|
||||||
abandon_progress_bar();
|
abandon_progress_bar();
|
||||||
|
|
||||||
progress_bar_displayed = TRUE;
|
|
||||||
|
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user