From: Paul Gofman pgofman@codeweavers.com
--- dlls/ntdll/tests/directory.c | 1 + dlls/ntdll/unix/file.c | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c index babe0f7a8fe..c05b51860e1 100644 --- a/dlls/ntdll/tests/directory.c +++ b/dlls/ntdll/tests/directory.c @@ -483,6 +483,7 @@ static void test_NtQueryDirectoryFile(void) {L"??.", {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}, {L"??.???", {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, {L"<", {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1}}, + {L"*<a", {0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0}}, {L"<.", {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1}}, {L"<..", {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}}, {L"<."", {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1}}, diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index d3bbcdffdc6..429f8839ed2 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -1442,10 +1442,13 @@ static BOOLEAN match_filename_part( const WCHAR *name, const WCHAR *name_end, co while (name < name_end) { c = *mask == '"' ? '.' : *mask; - if (is_case_sensitive) - while (name < name_end && (*name != c)) name++; - else - while (name < name_end && (towupper(*name) != towupper(c))) name++; + if (!is_wildcard(c)) + { + if (is_case_sensitive) + while (name < name_end && (*name != c)) name++; + else + while (name < name_end && (towupper(*name) != towupper(c))) name++; + } if (match_filename_part( name, name_end, mask, mask_end )) return TRUE; ++name; }