diff options
author | Wayne Davison <wayned@samba.org> | 2008-07-05 00:21:05 -0700 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2008-07-05 00:31:46 -0700 |
commit | bb4e4d889f51065dcef6f34d8ba4a80c051149a1 (patch) | |
tree | 2b94439eb059cc33a1862da2d988737e3b4a8619 /log.c | |
parent | 93f3fbf73e2e2b1c2560482fb395c3f9a6835fc8 (diff) | |
download | android_external_rsync-bb4e4d889f51065dcef6f34d8ba4a80c051149a1.tar.gz android_external_rsync-bb4e4d889f51065dcef6f34d8ba4a80c051149a1.tar.bz2 android_external_rsync-bb4e4d889f51065dcef6f34d8ba4a80c051149a1.zip |
The --progress output now leaves the cursor at the end of the line
(instead of the start) in order to be extra sure that an error won't
overwrite it. We also ensure that the progress option can't be enabled
on the server side.
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -321,7 +321,7 @@ void rwrite(enum logcode code, const char *buf, int len, int is_utf8) exit_cleanup(RERR_MESSAGEIO); } - if (progress_is_active && !am_server) { + if (progress_is_active) { fputc('\n', f); progress_is_active = 0; } @@ -329,6 +329,12 @@ void rwrite(enum logcode code, const char *buf, int len, int is_utf8) trailing_CR_or_NL = len && (buf[len-1] == '\n' || buf[len-1] == '\r') ? buf[--len] : 0; + if (len && buf[0] == '\r') { + fputc('\r', f); + buf++; + len--; + } + #ifdef ICONV_CONST if (ic != (iconv_t)-1) { xbuf outbuf, inbuf; |