Only call show_progress() and end_progress() if do_progress is set.
[rsync/rsync.git] / match.c
diff --git a/match.c b/match.c
index 713142d..95d84b9 100644 (file)
--- a/match.c
+++ b/match.c
@@ -21,6 +21,7 @@
 
 extern int verbose;
 extern int am_server;
+extern int do_progress;
 
 typedef unsigned short tag;
 
@@ -127,7 +128,7 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
        else
                last_match = offset;
 
-       if (buf) {
+       if (buf && do_progress) {
                show_progress(last_match, buf->file_size);
 
                if (i == -1) end_progress(buf->file_size);