https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f153b52dbb461fd6c5346…
commit f153b52dbb461fd6c534643ae853b4191031ec7b
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Dec 24 02:47:31 2021 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Fri Dec 24 02:47:31 2021 +0900
[SHELL32] Use IDI_SHELL_DOCUMENT for broken non-exe icons
CORE-16287
---
dll/win32/shell32/folders/CFSFolder.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/folders/CFSFolder.cpp
b/dll/win32/shell32/folders/CFSFolder.cpp
index 09c7574fd9c..b1c578ada8b 100644
--- a/dll/win32/shell32/folders/CFSFolder.cpp
+++ b/dll/win32/shell32/folders/CFSFolder.cpp
@@ -321,7 +321,10 @@ HRESULT CFSExtractIcon_CreateInstance(IShellFolder * psf,
LPCITEMIDLIST pidl, RE
if (ret <= 0)
{
StringCbCopyW(wTemp, sizeof(wTemp), swShell32Name);
- icon_idx = -IDI_SHELL_EXE;
+ if (lstrcmpiW(pExtension, L".exe") == 0 ||
lstrcmpiW(pExtension, L".scr") == 0)
+ icon_idx = -IDI_SHELL_EXE;
+ else
+ icon_idx = -IDI_SHELL_DOCUMENT;
}
}