Windows: Correct root vol handling for UNC paths.
Otherwise CreateFullPath() fails.
This commit is contained in:
parent
0e932ba274
commit
73ece5b5ca
2 changed files with 15 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue