diff options
author | Brad King <brad.king@kitware.com> | 2016-08-25 13:50:19 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-08-25 13:50:19 (GMT) |
commit | d8b70f62cb1a5ea7231c4236bed57206068a946c (patch) | |
tree | 65e113552066c1210db721aa81c8fdaa20507e85 /Source | |
parent | d6734eeb875ceca5d810e829ca90541918dca2b4 (diff) | |
parent | 7bc6dccc0a993ddb3681100e28405189be09ff72 (diff) | |
download | CMake-d8b70f62cb1a5ea7231c4236bed57206068a946c.zip CMake-d8b70f62cb1a5ea7231c4236bed57206068a946c.tar.gz CMake-d8b70f62cb1a5ea7231c4236bed57206068a946c.tar.bz2 |
Merge topic 'update-kwsys'
7bc6dccc Merge branch 'upstream-KWSys' into update-kwsys
fcc53247 KWSys 2016-08-24 (8e643b9b)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index eb2bec6..1a73b16 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -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) { |