diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-01-25 06:39:33 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-01-25 06:39:33 +0000 |
commit | 166aa723324aac5102506159489e29ed31411d4b (patch) | |
tree | 4bf09c71b551f26dfe762c315ea4e74c9e9f91c3 | |
parent | f9f6184f38903386033626ee5e715fcf990361e6 (diff) | |
download | rsync-166aa723324aac5102506159489e29ed31411d4b.tar.gz |
patch from David Murn to make sure the final 100% is always printed
when using --progress
-rw-r--r-- | match.c | 2 | ||||
-rw-r--r-- | receiver.c | 2 | ||||
-rw-r--r-- | util.c | 4 |
3 files changed, 4 insertions, 4 deletions
@@ -122,7 +122,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf, if (buf) show_progress(last_match, buf->file_size); - if (i == -1) end_progress(); + if (i == -1) end_progress(buf->file_size); } @@ -269,7 +269,7 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname, offset += len; } - end_progress(); + end_progress(total_size); if (fd != -1 && offset > 0 && sparse_end(fd) != 0) { rprintf(FERROR,"write failed on %s : %s\n", @@ -767,12 +767,12 @@ int u_strcmp(const char *cs1, const char *cs2) static OFF_T last_ofs; -void end_progress(void) +void end_progress(OFF_T size) { extern int do_progress, am_server; if (do_progress && !am_server) { - rprintf(FINFO,"\n"); + rprintf(FINFO,"%.0f (100%%)\n", (double)size); } last_ofs = 0; } |