summaryrefslogtreecommitdiff
path: root/rsync.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-06-18 13:26:10 +0000
committerAndrew Tridgell <tridge@samba.org>1998-06-18 13:26:10 +0000
commit46831d6fcf5ace953b1e354a542b9bb45cdf376a (patch)
treefc7f0cfd8c0c9cc8947200d011fc9861b69cb483 /rsync.c
parentb58ad6c569e185cb7c8512ee5e061762b5ebe605 (diff)
downloadrsync-46831d6fcf5ace953b1e354a542b9bb45cdf376a.tar.gz
rsync-46831d6fcf5ace953b1e354a542b9bb45cdf376a.tar.bz2
rsync-46831d6fcf5ace953b1e354a542b9bb45cdf376a.zip
fixed chmod bug pointed out by Han Holl <jeholl@euronet.nl>
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rsync.c b/rsync.c
index 8e7b74c9..38321459 100644
--- a/rsync.c
+++ b/rsync.c
@@ -311,7 +311,8 @@ static int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st,
#ifdef HAVE_CHMOD
if (preserve_perms && !S_ISLNK(st->st_mode) &&
- st->st_mode != file->mode) {
+ (st->st_mode != file->mode ||
+ (updated && (file->mode & ~ACCESSPERMS)))) {
updated = 1;
if (do_chmod(fname,file->mode) != 0) {
rprintf(FERROR,"failed to set permissions on %s : %s\n",