mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 07:11:05 -06:00
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2016-08-24 (8e643b9b)
This commit is contained in:
@@ -4725,8 +4725,11 @@ bool SystemTools::GetShortPath(const std::string& path, std::string& shortPath)
|
||||
std::wstring wtempPath = Encoding::ToWide(tempPath);
|
||||
DWORD ret = GetShortPathNameW(wtempPath.c_str(), NULL, 0);
|
||||
std::vector<wchar_t> buffer(ret);
|
||||
ret = GetShortPathNameW(wtempPath.c_str(),
|
||||
&buffer[0], static_cast<DWORD>(buffer.size()));
|
||||
if (ret != 0)
|
||||
{
|
||||
ret = GetShortPathNameW(wtempPath.c_str(),
|
||||
&buffer[0], static_cast<DWORD>(buffer.size()));
|
||||
}
|
||||
|
||||
if (ret == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user