https://git.reactos.org/?p=reactos.git;a=commitdiff;h=894e5cddd69ad95b27c12…
commit 894e5cddd69ad95b27c12646533f4a0eccaa7b1d
Author:     Denis Robert <denis.beru(a)hotmail.fr>
AuthorDate: Mon Dec 30 14:14:44 2024 +0100
Commit:     GitHub <noreply(a)github.com>
CommitDate: Mon Dec 30 16:14:44 2024 +0300
    [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...
     }