https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2dd4f8714d72cebeaca3b5...
commit 2dd4f8714d72cebeaca3b50ba4d48df7e91e7375 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Mon Sep 7 15:48:25 2020 +0900 Commit: GitHub noreply@github.com CommitDate: Mon Sep 7 15:48:25 2020 +0900
[SHELLFIND] Fix directory search upon non-empty word/phrase query (#3130)
If the search phrase was not empty, it must not match the directory. CORE-17244 --- dll/win32/browseui/shellfind/CFindFolder.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dll/win32/browseui/shellfind/CFindFolder.cpp b/dll/win32/browseui/shellfind/CFindFolder.cpp index fb6ba371dda..d3c2b6f3c5c 100644 --- a/dll/win32/browseui/shellfind/CFindFolder.cpp +++ b/dll/win32/browseui/shellfind/CFindFolder.cpp @@ -280,8 +280,9 @@ static UINT RecursiveFind(LPCWSTR lpPath, _SearchData *pSearchData) if (FindData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { CStringW status; - if (FileNameMatch(FindData.cFileName, pSearchData) - && AttribHiddenMatch(FindData.dwFileAttributes, pSearchData)) + if (pSearchData->szQueryW.IsEmpty() && + FileNameMatch(FindData.cFileName, pSearchData) && + AttribHiddenMatch(FindData.dwFileAttributes, pSearchData)) { PostMessageW(pSearchData->hwnd, WM_SEARCH_ADD_RESULT, 0, (LPARAM) StrDupW(szPath)); uTotalFound++;