summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-05-29 16:52:38 (GMT)
committerBrad King <brad.king@kitware.com>2018-05-29 18:00:33 (GMT)
commit83630d491888705dc650f2ae62de9943181b50df (patch)
treefc93d648b7f52ce91ff82b2574cce5a1a6ce3593 /Source/cmSystemTools.cxx
parent519427e32c1f914b2a4184553c18fccd4614209d (diff)
downloadCMake-83630d491888705dc650f2ae62de9943181b50df.zip
CMake-83630d491888705dc650f2ae62de9943181b50df.tar.gz
CMake-83630d491888705dc650f2ae62de9943181b50df.tar.bz2
cmSystemTools: Revert GetRealPath implementation on Windows
The use of `uv_fs_realpath` introduced by commit v3.11.0-rc1~445^2~1 (cmSystemTools: Implement GetRealPath on Windows, 2017-10-02) causes `subst` drives to be expanded on Windows, breaking existing use cases. Revert its use until an alternative implementation can be chosen. Preserve the behavior introduced by commit v3.11.0-rc1~445^2 (cmTimestamp: For symlinks switch to timestamp of resolved path, 2017-10-02) by retaining use of `uv_fs_realpath` in a function of a different name. Fixes: #18033 Issue: #17206
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index eeb73c3..6f326de 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -949,10 +949,12 @@ cmSystemTools::WindowsFileRetry cmSystemTools::GetWindowsFileRetry()
}
return retry;
}
+#endif
-std::string cmSystemTools::GetRealPath(const std::string& path,
- std::string* errorMessage)
+std::string cmSystemTools::GetRealPathResolvingWindowsSubst(
+ const std::string& path, std::string* errorMessage)
{
+#ifdef _WIN32
// uv_fs_realpath uses Windows Vista API so fallback to kwsys if not found
std::string resolved_path;
uv_fs_t req;
@@ -981,8 +983,10 @@ std::string cmSystemTools::GetRealPath(const std::string& path,
resolved_path = path;
}
return resolved_path;
-}
+#else
+ return cmsys::SystemTools::GetRealPath(path, errorMessage);
#endif
+}
void cmSystemTools::InitializeLibUV()
{