mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 23:59:53 -05:00
Merge branch 'upstream-KWSys' into cmake-E-copy-system-errors
# By KWSys Upstream * upstream-KWSys: KWSys 2025-11-12 (1139f8a0)
This commit is contained in:
@@ -184,7 +184,7 @@ Status Directory::Load(std::string const& name, std::string* errorMessage)
|
||||
delete[] buf;
|
||||
|
||||
if (srchHandle == INVALID_HANDLE_VALUE) {
|
||||
Status status = Status::POSIX_errno();
|
||||
Status status = Status::Windows_GetLastError();
|
||||
if (errorMessage) {
|
||||
*errorMessage = status.GetString();
|
||||
}
|
||||
@@ -198,7 +198,7 @@ Status Directory::Load(std::string const& name, std::string* errorMessage)
|
||||
} while (FindNextFileW(srchHandle, &data));
|
||||
this->Internal->Path = name;
|
||||
if (!FindClose(srchHandle)) {
|
||||
Status status = Status::POSIX_errno();
|
||||
Status status = Status::Windows_GetLastError();
|
||||
if (errorMessage) {
|
||||
*errorMessage = status.GetString();
|
||||
}
|
||||
|
||||
@@ -2273,7 +2273,7 @@ SystemTools::CopyStatus SystemTools::CopyFileIfNewer(
|
||||
// source and destination are files so do a copy if source is newer
|
||||
// Check if source file exists first
|
||||
if (!SystemTools::FileExists(source)) {
|
||||
return CopyStatus{ Status::POSIX_errno(), CopyStatus::SourcePath };
|
||||
return CopyStatus{ Status::POSIX(ENOENT), CopyStatus::SourcePath };
|
||||
}
|
||||
// If destination doesn't exist, always copy
|
||||
if (!SystemTools::FileExists(destination)) {
|
||||
|
||||
Reference in New Issue
Block a user