of keep_dirlinks if the current item is a directory.
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;
* 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;
}