summaryrefslogtreecommitdiff
path: root/progress.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-06-04 09:01:02 -0700
committerWayne Davison <wayned@samba.org>2008-06-04 09:01:02 -0700
commitf31850966f7f60b8c58fa44d6948044571c060f6 (patch)
treed8706237fe566266587537d8df43cecaf37a63e6 /progress.c
parent4ecf3e067151e45dc7dead9862416722dcb4a20f (diff)
downloadrsync-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/progress.c b/progress.c
index 1d3659e7..86f8ea13 100644
--- a/progress.c
+++ b/progress.c
@@ -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)