summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-01-20 19:35:25 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-01-20 19:35:25 (GMT)
commit1690c45626fb2bbe8176b6944a5dfb040952b86f (patch)
treec896892f040fd9e5864f591e980a97dc629ac769
parent9878c9ea34ad1f36fd4af9a07be54a23e8591078 (diff)
downloadCMake-1690c45626fb2bbe8176b6944a5dfb040952b86f.zip
CMake-1690c45626fb2bbe8176b6944a5dfb040952b86f.tar.gz
CMake-1690c45626fb2bbe8176b6944a5dfb040952b86f.tar.bz2
ENH: dont do relative paths when nothing is relative
-rw-r--r--Source/cmSystemTools.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index c36529b..a94f223 100644
--- a/Source/cmSystemTools.cxx
+++ b/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)