X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/4df9f36841dbdf5fa088a402d0dcdc8a4e0c86a6..74f5442401e626c6730b6df58c0cc1087e896a4c:/generator.c diff --git a/generator.c b/generator.c index 5321d8a2..3f6322f8 100644 --- a/generator.c +++ b/generator.c @@ -192,7 +192,7 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out) /* if the file exists already and we aren't perserving presmissions then act as though the remote end sent us the file permissions we already have */ - file->mode = st.st_mode; + file->mode = (file->mode & _S_IFMT) | (st.st_mode & ~_S_IFMT); } if (S_ISDIR(file->mode)) { @@ -353,8 +353,10 @@ void recv_generator(char *fname,struct file_list *flist,int i,int f_out) fd = do_open(fnamecmp, O_RDONLY, 0); if (fd == -1) { - rprintf(FERROR,"failed to open %s : %s\n",fnamecmp,strerror(errno)); - rprintf(FERROR,"skipping %s\n",fname); + rprintf(FERROR,"failed to open %s, continuing : %s\n",fnamecmp,strerror(errno)); + /* pretend the file didn't exist */ + write_int(f_out,i); + send_sums(NULL,f_out); return; }