X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/53dd3135f13728fbcfce4c85773d9fc97cfce714..5afd8aedce004cc11700285c16ea84f1e857d473:/receiver.c diff --git a/receiver.c b/receiver.c index e7a164b9..d941fa2b 100644 --- a/receiver.c +++ b/receiver.c @@ -414,15 +414,15 @@ int recv_files(int f_in,struct file_list *flist,char *local_name,int f_gen) the lchown. Thanks to snabb@epipe.fi for pointing this out */ fd2 = do_open(fnametmp,O_WRONLY|O_CREAT|O_EXCL, - file->mode & ACCESSPERMS); + file->mode & INITPERMMASK); if (fd2 == -1 && relative_paths && errno == ENOENT && create_directory_path(fnametmp) == 0) { fd2 = do_open(fnametmp,O_WRONLY|O_CREAT|O_EXCL, - file->mode & ACCESSPERMS); + file->mode & INITPERMMASK); } if (fd2 == -1) { - rprintf(FERROR,"open %s : %s\n",fnametmp,strerror(errno)); + rprintf(FERROR,"cannot create %s : %s\n",fnametmp,strerror(errno)); receive_data(f_in,buf,-1,NULL,file->length); if (buf) unmap_file(buf); if (fd1 != -1) close(fd1);