diff options
author | Wayne Davison <wayned@samba.org> | 2004-07-31 16:15:41 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2004-07-31 16:15:41 +0000 |
commit | 81b07870c8d1b69a594694898111f6c7af6ea419 (patch) | |
tree | 3d5c9f4126dec1b427afaeb6d5689c07941efaf1 /rsync.c | |
parent | bb6721dce6bac8ff2374609bf5f99ea7e6fe2c70 (diff) | |
download | android_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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |