boostorg / filesystem Public
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lexically_relative and lexically_poximate give unexpected result #76
Comments
I've been using c++14 and have encountered this problem on OSX, but not Linux. Boost 1.67 |
The trailing dot in the parent path ( |
I'm seeing this issue in Boost 1.70. Here is my code example: namespace fs = boost::filesystem;
int main()
{
fs::path parentPath("/home/user1/");
fs::path childPath("/home/user1/Downloads/Books");
std::cout << childPath.lexically_relative(parentPath) << '\n';
} The output is EDIT: Looks like std::cout << fs::relative(childPath, parentPath) << '\n'; Outputs: |
@Lastique Thank you for the fix!! |
/home/user/documents/file.txt
relative to/home/user/.
should bedocuments/file.txt
.c++17 gives the expected result.
outputs
The text was updated successfully, but these errors were encountered: