From 894e5cddd69ad95b27c12646533f4a0eccaa7b1d Mon Sep 17 00:00:00 2001 From: Denis Robert Date: Mon, 30 Dec 2024 14:14:44 +0100 Subject: [PATCH] [SHELL32] Fix BrowseForFolder expanding a folder containing a zip (#7585) Commit 325d74c30f3 (PR #7437) introduced a side effect that made impossible to expand a folder when it contained both a ZIP file and subfolders. Fix this by ignoring the return value of BrFolder_InsertItem and free the pidlTemp pointer explicitly in all cases. CORE-19955 CORE-19751 --- dll/win32/shell32/brfolder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/shell32/brfolder.cpp b/dll/win32/shell32/brfolder.cpp index 7b211939ef1..705809bb930 100644 --- a/dll/win32/shell32/brfolder.cpp +++ b/dll/win32/shell32/brfolder.cpp @@ -408,8 +408,8 @@ BrFolder_Expand( ULONG ulFetched; while (S_OK == pEnum->Next(1, &pidlTemp, &ulFetched)) { - if (!BrFolder_InsertItem(info, lpsf, pidlTemp, pidlFull, hParent)) - break; + /* Ignore return value of BrFolder_InsertItem to avoid incomplete folder listing */ + BrFolder_InsertItem(info, lpsf, pidlTemp, pidlFull, hParent); pidlTemp.Free(); // Finally, free the pidl that the shell gave us... }