kernelbase: Get unprocessed mask in FindFirstFileExW().

This commit is contained in:
Paul Gofman 2023-08-30 18:36:25 -06:00 committed by Alexandre Julliard
parent 68fecd77eb
commit a90f695f78
2 changed files with 4 additions and 3 deletions

View file

@ -3019,8 +3019,8 @@ static void test_FindFirstFile_wildcards(void)
{1, "..< ", ", '..a'"},
{1, "?", ", '.', '..', 'a'"},
{1, "?.", ", '.', '..', 'a'"},
{1, "?. ", ", '.', '..', 'a'"},
{0, "?.", ", '.', '..', 'a'"},
{0, "?. ", ", '.', '..', 'a'"},
{1, "??.", ", '.', '..', 'a', 'aa'"},
{1, "??. ", ", '.', '..', 'a', 'aa'"},
{1, "???.", ", '.', '..', 'a', 'aa', 'aaa'"},

View file

@ -1190,6 +1190,7 @@ HANDLE WINAPI DECLSPEC_HOTPATCH FindFirstFileExW( LPCWSTR filename, FINDEX_INFO_
if (has_wildcard)
{
size = 8192;
mask = PathFindFileNameW( filename );
mask_size = (lstrlenW( mask ) + 1) * sizeof(*mask);
}
else size = max_entry_size;
@ -1408,7 +1409,7 @@ static BOOL match_filename( const WCHAR *name, int length, const WCHAR *mask )
}
}
while (mask < mask_end && (*mask == '.' || *mask == '*'))
while (mask < mask_end && (*mask == ' ' || *mask == '.' || *mask == '*'))
mask++;
return (name == name_end && mask == mask_end);
}