X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/6e45e1dd865180c6cb82f977698287daec6bffc6..b4afd23c308ed2ef7df894cfb8be532fee521ad5:/generator.c diff --git a/generator.c b/generator.c index 899e744a..33fcf2ab 100644 --- a/generator.c +++ b/generator.c @@ -291,9 +291,8 @@ static void recv_generator(char *fname, struct file_struct *file, int i, return; } - if (statret == 0 && - !preserve_perms && - (S_ISDIR(st.st_mode) == S_ISDIR(file->mode))) { + if (statret == 0 && !preserve_perms + && S_ISDIR(st.st_mode) == S_ISDIR(file->mode)) { /* if the file exists already and we aren't perserving * permissions then act as though the remote end sent * us the file permissions we already have */ @@ -404,9 +403,6 @@ 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; @@ -446,7 +442,7 @@ static void recv_generator(char *fname, struct file_struct *file, int i, return; if (errno == ENOENT) { write_int(f_out,i); - if (!dry_run) + if (!dry_run && !read_batch) write_sum_head(f_out, NULL); } else if (verbose > 1) { rsyserr(FERROR, errno, @@ -465,7 +461,7 @@ static void recv_generator(char *fname, struct file_struct *file, int i, if (preserve_hard_links && hard_link_check(file, HL_SKIP)) return; write_int(f_out,i); - if (!dry_run) + if (!dry_run && !read_batch) write_sum_head(f_out, NULL); return; } @@ -489,7 +485,7 @@ static void recv_generator(char *fname, struct file_struct *file, int i, return; } - if (dry_run) { + if (dry_run || read_batch) { write_int(f_out,i); return; }