X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/4df9f36841dbdf5fa088a402d0dcdc8a4e0c86a6..dcc875e41e1c9865755dbd0cc839e74ac878910e:/generator.c diff --git a/generator.c b/generator.c index 5321d8a2..9bf0e959 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)) {