aboutsummaryrefslogtreecommitdiffstats
path: root/sender.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-07-08 06:25:47 +0000
committerWayne Davison <wayned@samba.org>2007-07-08 06:25:47 +0000
commit6755a7d7426dcc9b887f80f066021dbacffc7b10 (patch)
tree6b4d97b85b3300a81f55c7daa32606b31b6b0a84 /sender.c
parent5459e693a31e67bd68f6ef58d89ada67ddee9670 (diff)
downloadandroid_external_rsync-6755a7d7426dcc9b887f80f066021dbacffc7b10.tar.gz
android_external_rsync-6755a7d7426dcc9b887f80f066021dbacffc7b10.tar.bz2
android_external_rsync-6755a7d7426dcc9b887f80f066021dbacffc7b10.zip
If we get an ndx that is 1 entry prior to an incremental flist's
start, it refers to the file list's parent dir.
Diffstat (limited to 'sender.c')
-rw-r--r--sender.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sender.c b/sender.c
index 13ae8e4d..397e1c8a 100644
--- a/sender.c
+++ b/sender.c
@@ -43,7 +43,7 @@ extern int inplace;
extern int batch_fd;
extern int write_batch;
extern struct stats stats;
-extern struct file_list *cur_flist, *first_flist;
+extern struct file_list *cur_flist, *first_flist, *dir_flist;
/**
* @file
@@ -210,7 +210,10 @@ void send_files(int f_in, int f_out)
if (inc_recurse)
send_extra_file_list(f_out, FILECNT_LOOKAHEAD);
- file = cur_flist->files[ndx - cur_flist->ndx_start];
+ if (ndx - cur_flist->ndx_start >= 0)
+ file = cur_flist->files[ndx - cur_flist->ndx_start];
+ else
+ file = dir_flist->files[cur_flist->parent_ndx];
if (F_PATHNAME(file)) {
path = F_PATHNAME(file);
slash = "/";