X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/8fc4033ef08e747c961c1bf6c43995a39bf732f4..dc77edf2181a08ded466e8fc44b190c90b313c0d:/sender.c diff --git a/sender.c b/sender.c index b2ca39c4..397e1c8a 100644 --- a/sender.c +++ b/sender.c @@ -6,7 +6,7 @@ * Copyright (C) 2003-2007 Wayne Davison * * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as + * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, @@ -15,8 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + * with this program; if not, visit the http://fsf.org website. */ #include "rsync.h" @@ -44,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 @@ -211,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 = "/";