diff --git a/compat/win32/fscache.c b/compat/win32/fscache.c index 2f6a4f9eb80c77..aa9df4f4f742f6 100644 --- a/compat/win32/fscache.c +++ b/compat/win32/fscache.c @@ -206,7 +206,8 @@ static struct fsentry *fsentry_create_list(const struct fsentry *dir, pattern[wlen] = 0; /* open find handle */ - h = FindFirstFileW(pattern, &fdata); + h = FindFirstFileExW(pattern, FindExInfoBasic, &fdata, FindExSearchNameMatch, + NULL, FIND_FIRST_EX_LARGE_FETCH); if (h == INVALID_HANDLE_VALUE) { err = GetLastError(); *dir_not_found = 1; /* or empty directory */