Fixed the use of a dot-dir path (foo/./bar) inside of a files-from file.
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index cb667aa..19936ca 100644 (file)
--- 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;