diff options
author | Wayne Davison <wayned@samba.org> | 2008-06-04 09:01:02 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2008-06-04 09:01:02 -0700 |
commit | f31850966f7f60b8c58fa44d6948044571c060f6 (patch) | |
tree | d8706237fe566266587537d8df43cecaf37a63e6 /log.c | |
parent | 4ecf3e067151e45dc7dead9862416722dcb4a20f (diff) | |
download | android_external_rsync-f31850966f7f60b8c58fa44d6948044571c060f6.tar.gz android_external_rsync-f31850966f7f60b8c58fa44d6948044571c060f6.tar.bz2 android_external_rsync-f31850966f7f60b8c58fa44d6948044571c060f6.zip |
Improved the progress_is_active code to not overwrite the progress
output in more circumstances.
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |