We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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_normal
To Reproduce
#include <iostream> #include <filesystem> #include "filesystem.hpp" int main() { std::string p1 = "./../foo/../bar"; std::cout << std::filesystem::path(p1).lexically_normal() << '\n'; std::cout << ghc::filesystem::path(p1).lexically_normal() << '\n' << '\n'; std::string p0 = "./../foo/../../bar"; std::cout << std::filesystem::path(p0).lexically_normal() << '\n'; std::cout << ghc::filesystem::path(p0).lexically_normal() << '\n'; }
The above code produces:
"../bar" <-- std::filesystem "../bar" <-- ghc::filesystem "../../bar" <-- std::filesystem "bar" <-- ghc::filesystem
If the first "stanza" is correct, than the second stanza should include the ../.., I reckon.
../..
The text was updated successfully, but these errors were encountered:
fix lexically_normal for ../foo/../../bar/
../foo/../../bar/
371f9ad
* originally this was "normalizing" to `"bar"` when it should be `"../../bar"` * this fixes gulrak#185
Successfully merging a pull request may close this issue.
To Reproduce
The above code produces:
If the first "stanza" is correct, than the second stanza should include the
../..
, I reckon.The text was updated successfully, but these errors were encountered: