summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Dykstra <dwd@samba.org>1999-03-12 17:36:52 +0000
committerDavid Dykstra <dwd@samba.org>1999-03-12 17:36:52 +0000
commit245fbb5129975a8b6550d14123bd0bdc40f3f63b (patch)
tree6fa34e565fd2d3f22864c8eb51530a62f956b8e3
parentc7c11a0d4c315a052dddf97cc6d3d63a54b4a831 (diff)
downloadrsync-245fbb5129975a8b6550d14123bd0bdc40f3f63b.tar.gz
When -R is used, send the permissions of the original top directories to
the receiver even when not combined with -r. Without this, the directories were getting created mode 777 because the default umask on receivers is often 00.
-rw-r--r--flist.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/flist.c b/flist.c
index f7ab5a9c..c6e0006c 100644
--- a/flist.c
+++ b/flist.c
@@ -683,10 +683,17 @@ struct file_list *send_file_list(int f,int argc,char *argv[])
*p = '/';
for (p=fname+1; (p=strchr(p,'/')); p++) {
int copy_links_saved = copy_links;
+ int recurse_saved = recurse;
*p = 0;
copy_links = copy_unsafe_links;
+ /* set recurse to 1 to prevent make_file
+ from ignoring directory, but still
+ turn off the recursive parameter to
+ send_file_name */
+ recurse = 1;
send_file_name(f, flist, fname, 0, 0);
copy_links = copy_links_saved;
+ recurse = recurse_saved;
*p = '/';
}
} else {