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 /progress.c | |
parent | 4ecf3e067151e45dc7dead9862416722dcb4a20f (diff) | |
download | rsync-f31850966f7f60b8c58fa44d6948044571c060f6.tar.gz rsync-f31850966f7f60b8c58fa44d6948044571c060f6.tar.bz2 rsync-f31850966f7f60b8c58fa44d6948044571c060f6.zip |
Improved the progress_is_active code to not overwrite the progress
output in more circumstances.
Diffstat (limited to 'progress.c')
-rw-r--r-- | progress.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -111,13 +111,13 @@ static void rprint_progress(OFF_T ofs, OFF_T size, struct timeval *now, stats.num_transferred_files, stats.num_files - current_file_index - 1, stats.num_files); - progress_is_active = 0; - } else { + } else strlcpy(eol, "\r", sizeof eol); - progress_is_active = 1; - } + progress_is_active = 0; rprintf(FCLIENT, "%12s %3d%% %7.2f%s %s%s", human_num(ofs), pct, rate, units, rembuf, eol); + if (!is_last) + progress_is_active = 1; } void set_current_file_index(struct file_struct *file, int ndx) |