summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1999-11-08 10:47:14 +0000
committerAndrew Tridgell <tridge@samba.org>1999-11-08 10:47:14 +0000
commitf08baea3ddb54a99a918a3e0c557b32ca2517c6c (patch)
tree52130541de9c6d54bd66184156f8426701c44733
parent2fb139c11b9d999ca5ac3ce31c4369132fa28fe6 (diff)
downloadrsync-f08baea3ddb54a99a918a3e0c557b32ca2517c6c.tar.gz
removed ACCESSPERMS mask when transferring a file without perms
copy. This makes us match GNU cp more closely.
-rw-r--r--rsync.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/rsync.c b/rsync.c
index 5a02979e..680fc0bf 100644
--- a/rsync.c
+++ b/rsync.c
@@ -200,14 +200,9 @@ int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
#ifdef HAVE_CHMOD
if (!S_ISLNK(st->st_mode)) {
- int file_mode;
- if (preserve_perms)
- file_mode = file->mode;
- else
- file_mode = file->mode & ACCESSPERMS;
if (st->st_mode != file->mode) {
updated = 1;
- if (do_chmod(fname,file_mode) != 0) {
+ if (do_chmod(fname,file->mode) != 0) {
rprintf(FERROR,"failed to set permissions on %s : %s\n",
fname,strerror(errno));
return 0;