[1/2] hhctrl.ocx: Also take basename of folders when searching.

Vincent Povirk madewokherd at gmail.com
Tue Jan 17 10:53:37 CST 2017


From: Vincent Povirk <vincent at codeweavers.com>

Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
---
 dlls/hhctrl.ocx/search.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/hhctrl.ocx/search.c b/dlls/hhctrl.ocx/search.c
index 287e6d0..d758a1b 100644
--- a/dlls/hhctrl.ocx/search.c
+++ b/dlls/hhctrl.ocx/search.c
@@ -167,14 +167,14 @@ static SearchItem *SearchCHM_Storage(SearchItem *item, IStorage *pStorage,
     }
     while (IEnumSTATSTG_Next(elem, 1, &entries, &retr) == NOERROR)
     {
+        filename = entries.pwcsName;
+        while(strchrW(filename, '/'))
+            filename = strchrW(filename, '/')+1;
         switch(entries.type) {
         case STGTY_STORAGE:
-            item = SearchCHM_Folder(item, pStorage, entries.pwcsName, needle);
+            item = SearchCHM_Folder(item, pStorage, filename, needle);
             break;
         case STGTY_STREAM:
-            filename = entries.pwcsName;
-            while(strchrW(filename, '/'))
-                filename = strchrW(filename, '/')+1;
             if(strstrW(filename, szHTMext))
             {
                 WCHAR *title = SearchCHM_File(pStorage, filename, needle);
-- 
2.7.4




More information about the wine-patches mailing list