gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
MIT License
1.31k stars 168 forks source link

path::extension() of parent directory #166

Open chan-lee opened 1 year ago

chan-lee commented 1 year ago

Describe the bug extension of a path ending in parent directory returns "."

To Reproduce CHECK(fs::path("/foo/..").extension() == ".");

Expected behavior but reference site is different ( https://en.cppreference.com/w/cpp/filesystem/path/extension ) CHECK(fs::path("/foo/..").extension() == "");

Additional context nothing

gulrak commented 1 year ago

Yeah, you are right, that should not be.