On Tue, Nov 04, 2008 at 10:21:31AM -0700, Leon Vanderploeg wrote: > In the previous version of rsync a /./ in the from file would cause > the previous path information to be dropped for the destination > directory. In 3.0.4, it appears the . is being translated into the > current (working) directory.
This turns out to be a chdir problem where rsync is returning to the current directory for each new path after a /./ is used, when it should be returning to the base directory that was specified as the source of the files-from transfer. The patch is quite simple, and is attached and also checked in to the git repository. You can work around the issue by doing a chdir to the directory that is the root of your --files-from transfer. E.g., in your example, a "cd /" prior to the transfer should make it work. ..wayne..
--- a/flist.c +++ b/flist.c @@ -2008,9 +2008,6 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) start_write = stats.total_written; gettimeofday(&start_tv, NULL); - if (!orig_dir) - orig_dir = strdup(curr_dir); - if (relative_paths && protocol_version >= 30) implied_dirs = 1; /* We send flagged implied dirs */ @@ -2036,6 +2033,9 @@ struct file_list *send_file_list(int f, int argc, char *argv[]) use_ff_fd = 1; } + if (!orig_dir) + orig_dir = strdup(curr_dir); + while (1) { char fbuf[MAXPATHLEN], *fn, name_type;
-- Please use reply-all for most replies to avoid omitting the mailing list. To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html