X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/080ddf58aeb4fdf161459576068048486e624f4f..5c6fc4a6a3328d9995377efdc05a90987b96d9a2:/flist.c diff --git a/flist.c b/flist.c index b1a35381..b66c19af 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)