Menu

#1007 std::filesystem::path "//myserver" root-name

v1.0 (example)
open
nobody
None
5
2025-06-12
2025-06-12
Full Name
No

MinGW doesn't know that the root name in Windows can start with two slashes:

MSVC

assert(fs::path(R"(\\server/folder)").root_name().string() == R"(\\server)");
assert(fs::path(R"(\\server/folder)").root_directory().string() == "/");
assert(fs::path(R"(\\server/folder)").root_path().string() == R"(\\server/)");

MinGW

assert(fs::path(R"(\\server/folder)").root_name().string() == "");
assert(fs::path(R"(\\server/folder)").root_directory().string() == R"(\)");
assert(fs::path(R"(\\server/folder)").root_path().string() == R"(\)");

Discussion


Log in to post a comment.