summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-02-09 21:45:15 (GMT)
committerBrad King <brad.king@kitware.com>2009-02-09 21:45:15 (GMT)
commit6ed916795d2ead0e18348213c3362757adfc2335 (patch)
treef5b9205022b29b928e946564e56576bea48d05dd
parentdda19cd36f94343e711210c6aefee8406bcce22e (diff)
downloadCMake-6ed916795d2ead0e18348213c3362757adfc2335.zip
CMake-6ed916795d2ead0e18348213c3362757adfc2335.tar.gz
CMake-6ed916795d2ead0e18348213c3362757adfc2335.tar.bz2
BUG: Work around broken GetLongPathName case
On Windows the GetLongPathName API function does not work on some filesystems even if the file exists. In this case we should just use the original long path name and not the GetShortPathName result. See issue #8480.
-rw-r--r--Source/kwsys/SystemTools.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index a46cc5b..a934b90 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -3058,6 +3058,11 @@ kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p)
{
return p;
}
+ // Use original path if conversion back to a long path failed.
+ if(longPath == shortPath)
+ {
+ longPath = p;
+ }
// make sure drive letter is always upper case
if(longPath.size() > 1 && longPath[1] == ':')
{