Moved the --append check so that files that don't need to be transferred
[rsync/rsync.git] / generator.c
index 909c0f4..e189ddd 100644 (file)
@@ -1743,9 +1743,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
 
-       if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file))
-               goto cleanup;
-
        if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
@@ -1770,6 +1767,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
                goto cleanup;
        }
 
+       if (append_mode > 0 && sx.st.st_size >= F_LENGTH(file)) {
+               goto cleanup;
+       }
+
   prepare_to_open:
        if (partialptr) {
                sx.st = partial_st;