Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels