зеркало из https://github.com/github/putty.git
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:
Родитель
5d6d052d8b
Коммит
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, "");
|
||||
prev_stats_len = len;
|
||||
|
||||
progress_bar_displayed = TRUE;
|
||||
|
||||
if (uint64_compare(done, size) == 0)
|
||||
abandon_progress_bar();
|
||||
|
||||
progress_bar_displayed = TRUE;
|
||||
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче