- Added a new block_size arg to map_file(). Use it to set the
[rsync/rsync.git] / generator.c
index 72b6905..b431cb7 100644 (file)
@@ -165,7 +165,7 @@ static void sum_sizes_sqroot(struct sum_struct *sum, uint64 len)
                blength = MAX(blength, BLOCK_SIZE);
                blength = MIN(blength, MAX_MAP_SIZE);
        }
-       max_map_size = MIN(MAX_MAP_SIZE, blength * 32);
+       max_map_size = MAX(MAX_MAP_SIZE, blength * 32);
 
        if (protocol_version < 27) {
                s2length = csum_length;
@@ -330,9 +330,6 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
                return;
        }
 
-       if (read_batch)
-               return;
-
        if (preserve_links && S_ISLNK(file->mode)) {
 #if SUPPORT_LINKS
                char lnk[MAXPATHLEN];
@@ -401,6 +398,9 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
        }
 #endif
 
+       if (read_batch)
+               return;
+
        if (preserve_hard_links && hard_link_check(file, HL_CHECK_MASTER))
                return;