Merge topic 'update-kwsys'
7bc6dccc
Merge branch 'upstream-KWSys' into update-kwsysfcc53247
KWSys 2016-08-24 (8e643b9b)
This commit is contained in:
commit
d8b70f62cb
|
@ -4725,8 +4725,11 @@ bool SystemTools::GetShortPath(const std::string& path, std::string& shortPath)
|
||||||
std::wstring wtempPath = Encoding::ToWide(tempPath);
|
std::wstring wtempPath = Encoding::ToWide(tempPath);
|
||||||
DWORD ret = GetShortPathNameW(wtempPath.c_str(), NULL, 0);
|
DWORD ret = GetShortPathNameW(wtempPath.c_str(), NULL, 0);
|
||||||
std::vector<wchar_t> buffer(ret);
|
std::vector<wchar_t> buffer(ret);
|
||||||
ret = GetShortPathNameW(wtempPath.c_str(),
|
if (ret != 0)
|
||||||
&buffer[0], static_cast<DWORD>(buffer.size()));
|
{
|
||||||
|
ret = GetShortPathNameW(wtempPath.c_str(),
|
||||||
|
&buffer[0], static_cast<DWORD>(buffer.size()));
|
||||||
|
}
|
||||||
|
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue