Windows: Correct root vol handling for UNC paths.

Otherwise CreateFullPath() fails.
This commit is contained in:
Unknown W. Brackets 2022-03-01 21:07:17 -08:00
parent 0e932ba274
commit 73ece5b5ca
2 changed files with 15 additions and 0 deletions

View file

@ -608,6 +608,10 @@ static bool TestPath() {
EXPECT_EQ_STR(Path("C:\\Yo").GetFilename(), std::string("Yo"));
EXPECT_EQ_STR(Path("C:\\Yo\\Lo").GetDirectory(), std::string("C:/Yo"));
EXPECT_EQ_STR(Path("C:\\Yo\\Lo").GetFilename(), std::string("Lo"));
EXPECT_EQ_STR(Path(R"(\\host\share\filename)").GetRootVolume().ToString(), std::string("//host"));
EXPECT_EQ_STR(Path(R"(\\?\UNC\share\filename)").GetRootVolume().ToString(), std::string("//?/UNC"));
EXPECT_EQ_STR(Path(R"(\\?\C:\share\filename)").GetRootVolume().ToString(), std::string("//?/C:"));
#endif
std::string computedPath;