From 1690c45626fb2bbe8176b6944a5dfb040952b86f Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 20 Jan 2004 14:35:25 -0500 Subject: [PATCH] ENH: dont do relative paths when nothing is relative --- Source/cmSystemTools.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index c36529bf0..a94f223ae 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)