Skip to content

Keep root path in canonical #3

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

Closed
wants to merge 1 commit into from

Conversation

mantiz
Copy link

@mantiz mantiz commented Jun 11, 2014

The assertion fails if you call canonical("../some-directory", "/"). This is because the root path is removed in the loop if the current segment equals to .. although the current result only contains the root path.
I think one would expect /some-directory as the result.

I don't know if there is a more efficient/elegant solution. Let me know if there is one. :)

@mantiz
Copy link
Author

mantiz commented Jul 10, 2014

Sorry, I forgot to create a Ticket, so here it is: https://svn.boost.org/trac/boost/ticket/10187
I think this may also fix https://svn.boost.org/trac/boost/ticket/9683 but I don't have a Windows machine to test it.

@Beman
Copy link
Contributor

Beman commented Jul 16, 2014

Fix applied. This did in fact also fix 9683.
The test cases were rewritten to provide more coverage.
Thanks for the fix!
--Beman

@Beman Beman closed this Jul 16, 2014
@jeking3 jeking3 mentioned this pull request Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants