From 7f9a54308462d044a034ad20c08d7b2509e72fd8 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Fri, 3 Apr 2015 12:18:07 +0000 Subject: [PATCH] [SHELL32] - Explicitly check for pidl type in GetAttributesOf method of CDesktopFolder and CDrivesFolder svn path=/trunk/; revision=67018 --- reactos/dll/win32/shell32/folders/CDesktopFolder.cpp | 6 +++++- reactos/dll/win32/shell32/folders/CDrivesFolder.cpp | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp b/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp index 700896da9c2..d6b2960fadc 100644 --- a/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp +++ b/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp @@ -550,8 +550,12 @@ HRESULT WINAPI CDesktopFolder::GetAttributesOf( *rgfInOut &= dwMyComputerAttributes; else if (_ILIsNetHood(apidl[i])) *rgfInOut &= dwMyNetPlacesAttributes; + else if (_ILIsSpecialFolder(apidl[i])) + SHELL32_GetItemAttributes(this, apidl[i], rgfInOut); + else if(_ILIsFolder(apidl[i]) || _ILIsValue(apidl[i])) + SHELL32_GetItemAttributes(this, apidl[i], rgfInOut); else - SHELL32_GetItemAttributes((IShellFolder *)this, apidl[i], rgfInOut); + ERR("Got an unknown pidl type!!!\n"); } } /* make sure SFGAO_VALIDATE is cleared, some apps depend on that */ diff --git a/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp b/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp index e20d2e14442..1ec5469949c 100644 --- a/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp +++ b/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp @@ -375,11 +375,10 @@ HRESULT WINAPI CDrivesFolder::GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY a *rgfInOut &= dwDriveAttributes; else if (_ILIsControlPanel(apidl[i])) *rgfInOut &= dwControlPanelAttributes; - else - { - pdump(apidl[i]); + else if (_ILIsSpecialFolder(*apidl)) SHELL32_GetItemAttributes(this, apidl[i], rgfInOut); - } + else + ERR("Got unknown pidl type!\n"); } }