diff options
author | Wayne Davison <wayned@samba.org> | 2007-07-08 06:25:47 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2007-07-08 06:25:47 +0000 |
commit | 6755a7d7426dcc9b887f80f066021dbacffc7b10 (patch) | |
tree | 6b4d97b85b3300a81f55c7daa32606b31b6b0a84 /receiver.c | |
parent | 5459e693a31e67bd68f6ef58d89ada67ddee9670 (diff) | |
download | rsync-6755a7d7426dcc9b887f80f066021dbacffc7b10.tar.gz rsync-6755a7d7426dcc9b887f80f066021dbacffc7b10.tar.bz2 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 'receiver.c')
-rw-r--r-- | receiver.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -53,7 +53,7 @@ extern struct stats stats; extern char *tmpdir; extern char *partial_dir; extern char *basis_dir[]; -extern struct file_list *cur_flist, *first_flist; +extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct filter_list_struct server_filter_list; static struct bitbag *delayed_bits = NULL; @@ -392,7 +392,10 @@ int recv_files(int f_in, char *local_name) continue; } - 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]; fname = local_name ? local_name : f_name(file, fbuf); if (verbose > 2) |