We set FLAG_DIR_CREATED on a dot dir that got created by
authorWayne Davison <wayned@samba.org>
Sat, 15 Sep 2007 19:58:12 +0000 (19:58 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 15 Sep 2007 19:58:12 +0000 (19:58 +0000)
get_local_name() rather than using the (now removed)
new_root_dir global.

main.c

diff --git a/main.c b/main.c
index d8d3480..188a99e 100644 (file)
--- a/main.c
+++ b/main.c
@@ -75,7 +75,6 @@ extern struct file_list *first_flist;
 extern struct filter_list_struct server_filter_list;
 
 int local_server = 0;
-int new_root_dir = 0;
 int daemon_over_rsh = 0;
 mode_t orig_umask = 0;
 int batch_gen_fd = -1;
@@ -560,7 +559,8 @@ static char *get_local_name(struct file_list *flist, char *dest_path)
                        exit_cleanup(RERR_FILEIO);
                }
 
-               new_root_dir = 1;
+               if (strcmp(flist->files[0]->basename, ".") == 0)
+                       flist->files[0]->flags |= FLAG_DIR_CREATED;
 
                if (verbose)
                        rprintf(FINFO, "created directory %s\n", dest_path);