summaryrefslogtreecommitdiff
path: root/generator.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2002-04-08 04:10:20 +0000
committerMartin Pool <mbp@samba.org>2002-04-08 04:10:20 +0000
commitb35d0d8e9ae9c5407c9f781b545f8a66b9caa9d0 (patch)
treeca00ceac1d12f7d7494ab5120e508e99db26b2cc /generator.c
parentc948e309f27c3edaef8a5a4dfc04e0da98944c97 (diff)
downloadrsync-b35d0d8e9ae9c5407c9f781b545f8a66b9caa9d0.tar.gz
rsync-b35d0d8e9ae9c5407c9f781b545f8a66b9caa9d0.tar.bz2
rsync-b35d0d8e9ae9c5407c9f781b545f8a66b9caa9d0.zip
Split code out into separate files and remove some global variables to
reduce symbol dependencies between files and therefore make it easier to write unit tests. The diff is large, but the actual code changes are pretty small.
Diffstat (limited to 'generator.c')
-rw-r--r--generator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generator.c b/generator.c
index c1b94fd8..8e4ede09 100644
--- a/generator.c
+++ b/generator.c
@@ -239,6 +239,7 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out)
extern int list_only;
extern int preserve_perms;
extern int only_existing;
+ extern int orig_umask;
if (list_only) return;
@@ -281,7 +282,7 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out)
}
if (statret != 0 && do_mkdir(fname,file->mode) != 0 && errno != EEXIST) {
if (!(relative_paths && errno==ENOENT &&
- create_directory_path(fname)==0 &&
+ create_directory_path(fname, orig_umask)==0 &&
do_mkdir(fname,file->mode)==0)) {
rprintf(FERROR, RSYNC_NAME ": recv_generator: mkdir \"%s\": %s (2)\n",
fname,strerror(errno));