diff options
author | Martin Pool <mbp@samba.org> | 2002-04-08 04:10:20 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2002-04-08 04:10:20 +0000 |
commit | b35d0d8e9ae9c5407c9f781b545f8a66b9caa9d0 (patch) | |
tree | ca00ceac1d12f7d7494ab5120e508e99db26b2cc /generator.c | |
parent | c948e309f27c3edaef8a5a4dfc04e0da98944c97 (diff) | |
download | rsync-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.c | 3 |
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)); |