diff options
-rw-r--r-- | generator.c | 3 | ||||
-rw-r--r-- | hlink.c | 2 | ||||
-rw-r--r-- | receiver.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/generator.c b/generator.c index c44ba3bb..973e03bd 100644 --- a/generator.c +++ b/generator.c @@ -81,6 +81,7 @@ extern int link_dest; extern int whole_file; extern int list_only; extern int read_batch; +extern int write_batch; extern int safe_symlinks; extern long block_size; /* "long" because popt can't set an int32. */ extern int unsort_ndx; @@ -1813,7 +1814,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, notify_others: if (remove_source_files && !delay_updates && !phase && !dry_run) increment_active_files(ndx, itemizing, code); - if (inc_recurse && !dry_run) + if (inc_recurse && (!dry_run || write_batch < 0)) cur_flist->in_progress++; #ifdef SUPPORT_HARD_LINKS if (preserve_hard_links && F_IS_HLINKED(file)) @@ -496,7 +496,7 @@ void finish_hard_link(struct file_struct *file, const char *fname, int fin_ndx, int prev_statret, ndx, prev_ndx = F_HL_PREV(file); if (stp == NULL && prev_ndx >= 0) { - if (link_stat(fname, &st, 0) < 0) { + if (link_stat(fname, &st, 0) < 0 && !dry_run) { rsyserr(FERROR_XFER, errno, "stat %s failed", full_fname(fname)); return; @@ -681,6 +681,8 @@ int recv_files(int f_in, int f_out, char *local_name) log_item(FCLIENT, file, iflags, NULL); if (!am_server) discard_receive_data(f_in, F_LENGTH(file)); + if (inc_recurse) + send_msg_int(MSG_SUCCESS, ndx); continue; } |