Explorar el Código

BUG: if short path or long path fails return the original input

Bill Hoffman hace 20 años
padre
commit
3387db4c05
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      Source/kwsys/SystemTools.cxx

+ 2 - 2
Source/kwsys/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