From 81b07870c8d1b69a594694898111f6c7af6ea419 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 31 Jul 2004 16:15:41 +0000 Subject: [PATCH] One call to link_stat() (in set_perms()) needed to honor the setting of keep_dirlinks if the current item is a directory. --- rsync.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rsync.c b/rsync.c index e46d0861..48aa610d 100644 --- a/rsync.c +++ b/rsync.c @@ -32,6 +32,7 @@ extern int preserve_uid; extern int preserve_gid; extern int force_delete; extern int recurse; +extern int keep_dirlinks; extern int make_backups; extern char *backup_dir; extern int inplace; @@ -187,7 +188,8 @@ int set_perms(char *fname,struct file_struct *file,STRUCT_STAT *st, * destination had the setuid or setgid bits set due * to the side effect of the chown call */ if (st->st_mode & (S_ISUID | S_ISGID)) { - link_stat(fname, st, 0); + link_stat(fname, st, + keep_dirlinks && S_ISDIR(st->st_mode)); } updated = 1; } -- 2.34.1