aboutsummaryrefslogtreecommitdiffstats
path: root/rsync.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2004-07-31 16:15:41 +0000
committerWayne Davison <wayned@samba.org>2004-07-31 16:15:41 +0000
commit81b07870c8d1b69a594694898111f6c7af6ea419 (patch)
tree3d5c9f4126dec1b427afaeb6d5689c07941efaf1 /rsync.c
parentbb6721dce6bac8ff2374609bf5f99ea7e6fe2c70 (diff)
downloadandroid_external_rsync-81b07870c8d1b69a594694898111f6c7af6ea419.tar.gz
android_external_rsync-81b07870c8d1b69a594694898111f6c7af6ea419.tar.bz2
android_external_rsync-81b07870c8d1b69a594694898111f6c7af6ea419.zip
One call to link_stat() (in set_perms()) needed to honor the setting
of keep_dirlinks if the current item is a directory.
Diffstat (limited to 'rsync.c')
-rw-r--r--rsync.c4
1 files changed, 3 insertions, 1 deletions
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;
}