KWSys 2025-04-02 (284a7281)

Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 284a7281f1d439bf97816dcdcb19c6fe5f146d85 (master).

Upstream Shortlog
-----------------

Brad King (1):
      d68a5d3f SystemTools: Comment why ChangeDirectory does not use UNC for long paths
This commit is contained in:
KWSys Upstream
2025-04-02 08:28:53 -04:00
committed by Brad King
parent 7bf8891b88
commit d64343249c

View File

@@ -329,6 +329,9 @@ inline char const* Getcwd(char* buf, unsigned int len)
}
inline int Chdir(std::string const& dir)
{
// We cannot use ToWindowsExtendedPath here because that causes a
// UNC path to be recorded as the process working directory, and
// can break child processes.
return _wchdir(KWSYS_NAMESPACE::Encoding::ToWide(dir).c_str());
}
inline void Realpath(std::string const& path, std::string& resolved_path,