Swapped arguments in replacement function of boost::filesystem::relative()
The arguments of our custom boost::filesystem::relative(from_path, to_path)
function (see utils.cpp) are swapped when compared to the original boost::filesystem::relative(p, base)
. This means that when building against boost libraries older than 1.6.0 (that don't have include this function), everything works as expected, but when using the actual boost implementation on newer libraries, the results returned are unexpected.
Example:
// on boost <= 1.6.0
boost::filesystem::relative("/", "/a/b/c/d"); // returns "a/b/c/d" (ok)
// on boost > 1.6.0
boost::filesystem::relative("/", "/a/b/c/d"); // return "../../../.." (error)