mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-24 22:58:16 -04:00
Make link-dest aware of --perms, --owner and --group.
---- Chris Darroch
This commit is contained in:
1 parent
52d3e10613
commit
bb24028f51
1 file changed
+11
-4
+11
-4
@@ -52,12 +52,19 @@ static int skip_file(char *fname,
|
||||
return 0;
|
||||
}
|
||||
if (link_dest) {
|
||||
if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) {
|
||||
extern int preserve_perms;
|
||||
extern int preserve_uid;
|
||||
extern int preserve_gid;
|
||||
|
||||
if((preserve_perms
|
||||
&& st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT))
|
||||
return 0;
|
||||
}
|
||||
if (st->st_uid != file->uid || st->st_gid != file->gid) {
|
||||
|
||||
if (preserve_uid && st->st_uid != file->uid)
|
||||
return 0;
|
||||
|
||||
if (preserve_gid && st->st_gid != file->gid)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* if always checksum is set then we use the checksum instead
|
||||
|
||||
Reference in new issue
Block a user