Author: gadamopoulos Date: Mon Aug 17 13:34:38 2015 New Revision: 68738
URL: http://svn.reactos.org/svn/reactos?rev=68738&view=rev Log: [SHELL32] - Fix a regression in SHELL32_GetFSItemAttributes found by our tests.
Modified: trunk/reactos/dll/win32/shell32/shlfolder.cpp
Modified: trunk/reactos/dll/win32/shell32/shlfolder.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfolder... ============================================================================== --- trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlfolder.cpp [iso-8859-1] Mon Aug 17 13:34:38 2015 @@ -572,6 +572,13 @@ { DWORD dwAttributes;
+ if (!_ILIsFolder(pidl) && !_ILIsValue(pidl)) + { + ERR("Got wrong type of pidl!\n"); + *pdwAttributes &= SFGAO_CANLINK; + return S_OK; + } + if (*pdwAttributes & ~dwSupportedAttr) { WARN ("attributes 0x%08x not implemented\n", (*pdwAttributes & ~dwSupportedAttr)); @@ -579,12 +586,6 @@ }
dwAttributes = _ILGetFileAttributes(pidl, NULL, 0); - if (!dwAttributes) - { - ERR("Got 0 attrs!\n"); - *pdwAttributes &= SFGAO_CANLINK; - return S_OK; - }
/* Set common attributes */ *pdwAttributes |= SFGAO_FILESYSTEM | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANDELETE |