ntdll: Also accept \\? as a UNC or device path in RtlDetermineDosPathNameType_U().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-08-23 22:50:04 -05:00 committed by Alexandre Julliard
parent f0ad5b5c54
commit ee5c46a55c
2 changed files with 11 additions and 4 deletions

View File

@ -244,10 +244,10 @@ DOS_PATHNAME_TYPE WINAPI RtlDetermineDosPathNameType_U( PCWSTR path )
if (IS_SEPARATOR(path[0]))
{
if (!IS_SEPARATOR(path[1])) return ABSOLUTE_PATH; /* "/foo" */
if (path[2] != '.') return UNC_PATH; /* "//foo" */
if (IS_SEPARATOR(path[3])) return DEVICE_PATH; /* "//./foo" */
if (path[3]) return UNC_PATH; /* "//.foo" */
return UNC_DOT_PATH; /* "//." */
if (path[2] != '.' && path[2] != '?') return UNC_PATH; /* "//foo" */
if (IS_SEPARATOR(path[3])) return DEVICE_PATH; /* "//./foo" or "//?/foo" */
if (path[3]) return UNC_PATH; /* "//.foo" or "//?foo" */
return UNC_DOT_PATH; /* "//." or "//?" */
}
else
{

View File

@ -68,6 +68,13 @@ static void test_RtlDetermineDosPathNameType_U(void)
{ "//.foo", 1 },
{ "\\\\.", 7 },
{ "//.", 7 },
{ "\\\\?\\foo", 6 },
{ "//?/foo", 6 },
{ "/\\?/foo", 6 },
{ "\\\\?foo", 1 },
{ "//?foo", 1 },
{ "\\\\?", 7 },
{ "//?", 7 },
{ NULL, 0 }
};