Ver código fonte

ENH: dont do relative paths when nothing is relative

Bill Hoffman 22 anos atrás
pai
commit
1690c45626
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      Source/cmSystemTools.cxx

+ 4 - 0
Source/cmSystemTools.cxx

@@ -1158,6 +1158,10 @@ std::string cmSystemTools::RelativePath(const char* local, const char* remote)
     {
     sameCount++;
     }
+  if(sameCount == 0)
+    {
+    return std::string(remote);
+    }
   // put in sameCount number of ../ into the path
   unsigned int i;
   for(i = sameCount; i < fileSplit.size(); ++i)