From c1f2824429286dd60fac723611b801e67eb745b1 Mon Sep 17 00:00:00 2001 From: Kouji Sasaki Date: Wed, 18 May 2005 09:43:39 +0000 Subject: [PATCH] Added the processing for determination of SFGAO_HASSUBFOLDER flag in SHELL32_GetItemAttribute function. --- dlls/shell32/shlfolder.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dlls/shell32/shlfolder.c b/dlls/shell32/shlfolder.c index da5acfbb2b..17d98f2f81 100644 --- a/dlls/shell32/shlfolder.c +++ b/dlls/shell32/shlfolder.c @@ -415,6 +415,22 @@ HRESULT SHELL32_GetItemAttributes (IShellFolder * psf, LPCITEMIDLIST pidl, LPDWO if (!_ILGetExtension(pidl, ext, MAX_PATH) || lstrcmpiA(ext, "lnk")) *pdwAttributes &= ~SFGAO_LINK; } + + if (SFGAO_HASSUBFOLDER & *pdwAttributes) + { + IShellFolder *psf2; + if (SUCCEEDED(IShellFolder_BindToObject(psf, pidl, 0, (REFIID)&IID_IShellFolder, (LPVOID *)&psf2))) + { + IEnumIDList *pEnumIL = NULL; + if (SUCCEEDED(IShellFolder_EnumObjects(psf2, 0, SHCONTF_FOLDERS, &pEnumIL))) + { + if (IEnumIDList_Skip(pEnumIL, 1) != S_OK) + *pdwAttributes &= ~SFGAO_HASSUBFOLDER; + IEnumIDList_Release(pEnumIL); + } + IShellFolder_Release(psf2); + } + } } else { *pdwAttributes &= SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK; } -- 2.32.0.93.g670b81a890