X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/1ed9018e69a0d224ff59184974d9150d1cb8814d..7462c6ac39d86cb8252ec47246569e3ddda35b6a:/log.c diff --git a/log.c b/log.c index b5bd9667..975ebaf3 100644 --- a/log.c +++ b/log.c @@ -37,6 +37,7 @@ extern int protocol_version; extern int preserve_times; extern int uid_ndx; extern int gid_ndx; +extern int progress_is_active; extern int stdout_format_has_i; extern int stdout_format_has_o_or_i; extern int logfile_format_has_i; @@ -320,6 +321,11 @@ void rwrite(enum logcode code, const char *buf, int len, int is_utf8) exit_cleanup(RERR_MESSAGEIO); } + if (progress_is_active && !am_server) { + fputc('\n', f); + progress_is_active = 0; + } + trailing_CR_or_NL = len && (buf[len-1] == '\n' || buf[len-1] == '\r') ? buf[--len] : 0; @@ -517,7 +523,7 @@ static void log_formatted(enum logcode code, const char *format, const char *op, break; case 'M': n = c = timestring(file->modtime); - while ((c = strchr(p, ' ')) != NULL) + while ((c = strchr(c, ' ')) != NULL) *c = '-'; break; case 'B':