Commit 245fbb51 authored by David Dykstra's avatar David Dykstra

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.
parent c7c11a0d
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment