mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 23:00:07 -06:00
Merge topic 'update-kwsys'
c89c49d67bMerge branch 'upstream-KWSys' into update-kwsys5c18d48fdaKWSys 2024-09-19 (2d72c140) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9833
This commit is contained in:
@@ -2597,8 +2597,12 @@ SystemTools::CopyStatus SystemTools::CloneFileContent(
|
||||
|
||||
// NOTE: we cannot use `clonefile` as the {a,c,m}time for the file needs to
|
||||
// be updated by `copy_file_if_different` and `copy_file`.
|
||||
// These flags are meant to be COPYFILE_METADATA | COPYFILE_CLONE, but CLONE
|
||||
// forces COPYFILE_NOFOLLOW_SRC and that violates the invariant that this
|
||||
// should result in a file.
|
||||
if (copyfile(source.c_str(), destination.c_str(), nullptr,
|
||||
COPYFILE_METADATA | COPYFILE_CLONE) < 0) {
|
||||
COPYFILE_METADATA | COPYFILE_EXCL | COPYFILE_STAT |
|
||||
COPYFILE_XATTR | COPYFILE_DATA) < 0) {
|
||||
return CopyStatus{ Status::POSIX_errno(), CopyStatus::NoPath };
|
||||
}
|
||||
# if KWSYS_CXX_HAS_UTIMENSAT
|
||||
|
||||
Reference in New Issue
Block a user