BUG: Fix to avoid relative path with ..s all the way to the root.
This commit is contained in:
parent
c710a2366d
commit
1c663cf41c
|
@ -1245,8 +1245,9 @@ std::string cmSystemTools::RelativePath(const char* local, const char* remote)
|
||||||
remoteSplit[sameCount] = "";
|
remoteSplit[sameCount] = "";
|
||||||
sameCount++;
|
sameCount++;
|
||||||
}
|
}
|
||||||
// If there is nothing in common with the paths, then just return the remote
|
// If there is nothing in common but the root directory, then just
|
||||||
if(sameCount == 0)
|
// return the full path.
|
||||||
|
if(sameCount <= 1)
|
||||||
{
|
{
|
||||||
return remote;
|
return remote;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue