diff options
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7bb1283..07d46ef 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1245,8 +1245,9 @@ std::string cmSystemTools::RelativePath(const char* local, const char* remote) remoteSplit[sameCount] = ""; sameCount++; } - // If there is nothing in common with the paths, then just return the remote - if(sameCount == 0) + // If there is nothing in common but the root directory, then just + // return the full path. + if(sameCount <= 1) { return remote; } |