Zebediah Figura : ntdll: Also accept \\? as a UNC or device path in RtlDetermineDosPathNameType_U().
Alexandre Julliard
julliard at winehq.org
Fri Aug 24 13:59:14 CDT 2018
Module: wine
Branch: master
Commit: ee5c46a55c6f982fe60a95dff4fe9fbcee1f0028
URL: https://source.winehq.org/git/wine.git/?a=commit;h=ee5c46a55c6f982fe60a95dff4fe9fbcee1f0028
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Aug 23 22:50:04 2018 -0500
ntdll: Also accept \\? as a UNC or device path in RtlDetermineDosPathNameType_U().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/path.c | 8 ++++----
dlls/ntdll/tests/path.c | 7 +++++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/path.c b/dlls/ntdll/path.c
index ccc95e3..8fe61da 100644
--- a/dlls/ntdll/path.c
+++ b/dlls/ntdll/path.c
@@ -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
{
diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index 9369e1c..94b76c1 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.c
@@ -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 }
};
More information about the wine-cvs
mailing list