Split code to generate "rwx-----" strings into lib/permstring.c so it
[rsync/rsync.git] / match.c
diff --git a/match.c b/match.c
index 86a04be..7b0f601 100644 (file)
--- a/match.c
+++ b/match.c
@@ -119,10 +119,11 @@ static void matched(int f,struct sum_struct *s,struct map_struct *buf,
        else
                last_match = offset;
 
-       if (buf)
+       if (buf) {
                show_progress(last_match, buf->file_size);
 
-       if (i == -1) end_progress();
+               if (i == -1) end_progress(buf->file_size);
+       }
 }
 
 
@@ -259,6 +260,7 @@ static void hash_search(int f,struct sum_struct *s,
 void match_sums(int f,struct sum_struct *s,struct map_struct *buf,OFF_T len)
 {
        char file_sum[MD4_SUM_LENGTH];
+       extern int write_batch;  /*  dw */
 
        last_match = 0;
        false_alarms = 0;
@@ -294,6 +296,8 @@ void match_sums(int f,struct sum_struct *s,struct map_struct *buf,OFF_T len)
                if (verbose > 2)
                        rprintf(FINFO,"sending file_sum\n");
                write_buf(f,file_sum,MD4_SUM_LENGTH);
+               if (write_batch) /* dw */
+                   write_batch_delta_file(file_sum, MD4_SUM_LENGTH);
        }
 
        if (targets) {