[PATCH 1/2] shell32: Only call HCR_GetFolderAttributes with simple pidls

Fabian Maurer wine at gitlab.winehq.org
Tue May 3 20:05:36 CDT 2022


From: Fabian Maurer <dark.shadow4 at web.de>

The function returns false with not-simple pidls anyways.
This fixes an "ERR" message when opening a control panel applet from explorer

Signed-off-by: Fabian Maurer <dark.shadow4 at web.de>
---
 dlls/shell32/shlfolder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c
index 120376ba82c..01496714c6a 100644
--- a/dlls/shell32/shlfolder.c
+++ b/dlls/shell32/shlfolder.c
@@ -415,7 +415,7 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder2 *psf, LPCITEMIDLIST pidl, LPDWO
     if (_ILIsDrive (pidl)) {
         *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FILESYSTEM|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|
 	    SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANLINK;
-    } else if (has_guid && HCR_GetFolderAttributes(pidl, &dwAttributes)) {
+    } else if (has_guid && _ILIsPidlSimple(pidl) && HCR_GetFolderAttributes(pidl, &dwAttributes)) {
 	*pdwAttributes = dwAttributes;
     } else if (_ILGetDataPointer (pidl)) {
 	DWORD file_attr = _ILGetFileAttributes (pidl, NULL, 0);
-- 
GitLab


https://gitlab.winehq.org/wine/wine/-/merge_requests/31



More information about the wine-devel mailing list