mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-26 10:48:38 -06:00
Merge topic 'fix-short-path'
a368a59467 Windows: Tolerate GetShortPathNameW failure
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8432
This commit is contained in:
@@ -175,7 +175,12 @@ std::string cmOutputConverter::ConvertToOutputForExisting(
|
||||
}
|
||||
|
||||
std::string tmp{};
|
||||
cmSystemTools::GetShortPath(remote, tmp);
|
||||
cmsys::Status status = cmSystemTools::GetShortPath(remote, tmp);
|
||||
if (!status) {
|
||||
// Fallback for cases when Windows refuses to resolve the short path,
|
||||
// like for C:\Program Files\WindowsApps\...
|
||||
tmp = remote;
|
||||
}
|
||||
shortPathCache[remote] = tmp;
|
||||
return tmp;
|
||||
}();
|
||||
|
||||
Reference in New Issue
Block a user