diff --git a/rsync.c b/rsync.c index f103e3cd..789aa61d 100644 --- a/rsync.c +++ b/rsync.c @@ -182,6 +182,8 @@ int read_ndx_and_attrs(int f_in, int f_out, int *iflag_ptr, exit_cleanup(RERR_PROTOCOL); } } else if (f_out >= 0) { + if (inc_recurse) + send_extra_file_list(f_out, FILECNT_LOOKAHEAD); write_ndx_and_attrs(f_out, ndx, iflags, fnamecmp_type, buf, len); } diff --git a/rsync.h b/rsync.h index 0fcc7972..a6d51377 100644 --- a/rsync.h +++ b/rsync.h @@ -104,6 +104,8 @@ #define OLD_PROTOCOL_VERSION 25 #define MAX_PROTOCOL_VERSION 40 +#define FILECNT_LOOKAHEAD 1000 + #define RSYNC_PORT 873 #define SPARSE_WRITE_SIZE (1024) diff --git a/sender.c b/sender.c index cab7e235..1c81ec1d 100644 --- a/sender.c +++ b/sender.c @@ -44,8 +44,6 @@ extern int write_batch; extern struct stats stats; extern struct file_list *cur_flist, *first_flist; -#define FILECNT_LOOKAHEAD 1000 - /** * @file * @@ -203,9 +201,6 @@ void send_files(int f_in, int f_out) continue; } - if (inc_recurse) - send_extra_file_list(f_out, FILECNT_LOOKAHEAD); - file = cur_flist->files[ndx - cur_flist->ndx_start]; if (F_ROOTDIR(file)) { path = F_ROOTDIR(file);