ENH: dont do relative paths when nothing is relative

This commit is contained in:
Bill Hoffman 2004-01-20 14:35:25 -05:00
parent 9878c9ea34
commit 1690c45626
1 changed files with 4 additions and 0 deletions

View File

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