Preserve file flags on symlinks in cp -Rp.
This reported ENOSYS before. PR: bin/111226 (part of) Submitted by: Martin Kammerhofer Approved by: ed (mentor) MFC after: 3 weeks
This commit is contained in:
parent
946a48449b
commit
f2db75739c
@ -365,7 +365,7 @@ setfile(struct stat *fs, int fd)
|
||||
if (!gotstat || fs->st_flags != ts.st_flags)
|
||||
if (fdval ?
|
||||
fchflags(fd, fs->st_flags) :
|
||||
(islink ? (errno = ENOSYS) :
|
||||
(islink ? lchflags(to.p_path, fs->st_flags) :
|
||||
chflags(to.p_path, fs->st_flags))) {
|
||||
warn("chflags: %s", to.p_path);
|
||||
rval = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user