1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +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:
Simon Tatham 2018-10-02 18:25:53 +01:00
parent 5d6d052d8b
commit dcb93d60e6

4
pscp.c
View File

@ -576,11 +576,11 @@ static void print_stats(const char *name, uint64 size, uint64 done,
printf("%*s", prev_stats_len - len, "");
prev_stats_len = len;
progress_bar_displayed = TRUE;
if (uint64_compare(done, size) == 0)
abandon_progress_bar();
progress_bar_displayed = TRUE;
fflush(stdout);
}