Always set UF_ARCHIVE on target (because they are by definition new files
and should be archived) and ignore error when we can't set it (e.g. NFS). Reviewed by: ken MFC after: 2 weeks
This commit is contained in:
parent
6ac6c9d5f4
commit
e6683f19dd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=267977
@ -337,8 +337,8 @@ err: if (unlink(to))
|
||||
* on a file that we copied, i.e., that we didn't create.)
|
||||
*/
|
||||
errno = 0;
|
||||
if (fchflags(to_fd, sbp->st_flags))
|
||||
if (errno != EOPNOTSUPP || sbp->st_flags != 0)
|
||||
if (fchflags(to_fd, sbp->st_flags | UF_ARCHIVE))
|
||||
if (errno != EOPNOTSUPP || ((sbp->st_flags & ~UF_ARCHIVE) != 0))
|
||||
warn("%s: set flags (was: 0%07o)", to, sbp->st_flags);
|
||||
|
||||
tval[0].tv_sec = sbp->st_atime;
|
||||
|
Loading…
Reference in New Issue
Block a user