From: Andrew Tridgell Date: Thu, 18 Jun 1998 13:26:10 +0000 (+0000) Subject: fixed chmod bug pointed out by Han Holl X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/46831d6fcf5ace953b1e354a542b9bb45cdf376a fixed chmod bug pointed out by Han Holl --- 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",