BUG: Fix bug#4482.
This commit is contained in:
parent
8529efdd87
commit
2a64bb4774
@ -2693,12 +2693,23 @@ kwsys_stl::string SystemTools::RelativePath(const char* local, const char* remot
|
|||||||
remoteSplit[sameCount] = "";
|
remoteSplit[sameCount] = "";
|
||||||
sameCount++;
|
sameCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// NOTE: We did this at one time to prevent relative paths to the
|
||||||
|
// compiler from looking like "../../../../../../../usr/bin/gcc".
|
||||||
|
// Now however relative paths are only computed for destinations
|
||||||
|
// inside the build tree so this is not a problem. This is now a
|
||||||
|
// general-purpose method and should not have this hack. I'm
|
||||||
|
// leaving it in place in case removing it causes a problem so it is
|
||||||
|
// easy to restore:
|
||||||
|
//
|
||||||
// If there is nothing in common but the root directory, then just
|
// If there is nothing in common but the root directory, then just
|
||||||
// return the full path.
|
// return the full path.
|
||||||
if(sameCount <= 1)
|
if(sameCount <= 1)
|
||||||
{
|
{
|
||||||
return remote;
|
return remote;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// for each entry that is not common in the local path
|
// for each entry that is not common in the local path
|
||||||
// add a ../ to the finalpath array, this gets us out of the local
|
// add a ../ to the finalpath array, this gets us out of the local
|
||||||
|
Loading…
x
Reference in New Issue
Block a user