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
This commit is contained in:
Brad King
2018-05-29 12:52:38 -04:00
parent 519427e32c
commit 83630d4918
4 changed files with 22 additions and 8 deletions

View File

@@ -500,12 +500,14 @@ public:
unsigned int Delay;
};
static WindowsFileRetry GetWindowsFileRetry();
/** Get the real path for a given path, removing all symlinks. */
static std::string GetRealPath(const std::string& path,
std::string* errorMessage = 0);
#endif
/** Get the real path for a given path, removing all symlinks.
This variant of GetRealPath also works on Windows but will
resolve subst drives too. */
static std::string GetRealPathResolvingWindowsSubst(
const std::string& path, std::string* errorMessage = nullptr);
/** Perform one-time initialization of libuv. */
static void InitializeLibUV();