summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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] == ':')
{