Fixed a problem with checking for the '.' dir in the first file
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index fe6d0b9..c189824 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -2193,7 +2193,7 @@ struct file_list *send_file_list(int f, int argc, char *argv[])
        if (inc_recurse) {
                send_dir_depth = 1;
                add_dirs_to_tree(-1, flist, dir_count);
-               if (!file_total || strcmp(flist->sorted[0]->basename, ".") != 0)
+               if (!file_total || strcmp(flist->sorted[flist->low]->basename, ".") != 0)
                        flist->parent_ndx = -1;
                flist_done_allocating(flist);
                if (send_dir_ndx < 0) {
@@ -2318,7 +2318,7 @@ struct file_list *recv_file_list(int f)
                else
                        io_error |= read_int(f);
        } else if (inc_recurse && flist->ndx_start == 1) {
-               if (!file_total || strcmp(flist->sorted[0]->basename, ".") != 0)
+               if (!file_total || strcmp(flist->sorted[flist->low]->basename, ".") != 0)
                        flist->parent_ndx = -1;
        }