X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/080ddf58aeb4fdf161459576068048486e624f4f..de91e757244a51006bdc1297df16f26782e3e5d2:/flist.c diff --git a/flist.c b/flist.c index b1a35381..e905a18f 100644 --- a/flist.c +++ b/flist.c @@ -53,7 +53,6 @@ extern int preserve_perms; extern int preserve_devices; extern int preserve_uid; extern int preserve_gid; -extern int preserve_times; extern int relative_paths; extern int implied_dirs; extern int copy_links; @@ -539,6 +538,7 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags, rdev_major = 0; uid = 0, gid = 0; *lastname = '\0'; + lastdir_len = -1; return; } @@ -745,7 +745,7 @@ struct file_struct *make_file(char *fname, char *basename, *dirname, *bp; unsigned short flags = 0; - if (!flist) /* lastdir isn't valid if flist is NULL */ + if (!flist || !flist->count) /* Ignore lastdir when invalid. */ lastdir_len = -1; if (strlcpy(thisname, fname, sizeof thisname) @@ -949,6 +949,10 @@ void send_file_name(int f, struct file_list *flist, char *fname, struct exclude_list_struct last_list = local_exclude_list; local_exclude_list.head = local_exclude_list.tail = NULL; send_directory(f, flist, f_name_to(file, fbuf)); + if (verbose > 2) { + rprintf(FINFO, "[%s] popping %sexclude list\n", + who_am_i(), local_exclude_list.debug_type); + } free_exclude_list(&local_exclude_list); local_exclude_list = last_list; }