From 11e0e6e3f08b619c8f6347d15fda7aa856acf396 Mon Sep 17 00:00:00 2001
From: Bill Hoffman <bill.hoffman@kitware.com>
Date: Thu, 7 Apr 2005 17:20:33 -0400
Subject: [PATCH] BUG: if short path or long path fails return the original
 input

---
 SystemTools.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SystemTools.cxx b/SystemTools.cxx
index 5279c0d..914d39d 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -2244,13 +2244,13 @@ kwsys_stl::string SystemTools::GetActualCaseForPath(const char* p)
   std::string path;
   if(!SystemTools::GetShortPath(p, path))
     {
-    return path;
+    return p;
     }
   char buffer[MAX_PATH+1];
   int len = ::GetLongPathName(path.c_str(), buffer, MAX_PATH+1);
   if(len == 0 || len > MAX_PATH+1)
     {
-    return path;
+    return p;
     }
   return buffer;
 #endif  
-- 
GitLab