Author: gadamopoulos Date: Sat Mar 28 19:42:08 2015 New Revision: 66935
URL: http://svn.reactos.org/svn/reactos?rev=66935&view=rev Log: [SHELL32] - Fix CControlPanelFolder to report its attributes.
Modified: trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/C... ============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CControlPanelFolder.cpp [iso-8859-1] Sat Mar 28 19:42:08 2015 @@ -455,6 +455,8 @@ HRESULT WINAPI CControlPanelFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD * rgfInOut) { HRESULT hr = S_OK; + static const DWORD dwControlPanelAttributes = + SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CANLINK;
TRACE("(%p)->(cidl=%d apidl=%p mask=%p (0x%08x))\n", this, cidl, apidl, rgfInOut, rgfInOut ? *rgfInOut : 0); @@ -467,12 +469,19 @@ if (*rgfInOut == 0) *rgfInOut = ~0;
- while(cidl > 0 && *apidl) - { - pdump(*apidl); - SHELL32_GetItemAttributes(this, *apidl, rgfInOut); - apidl++; - cidl--; + if (!cidl) + { + *rgfInOut &= dwControlPanelAttributes; + } + else + { + while(cidl > 0 && *apidl) + { + pdump(*apidl); + SHELL32_GetItemAttributes(this, *apidl, rgfInOut); + apidl++; + cidl--; + } } /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ *rgfInOut &= ~SFGAO_VALIDATE;