Author: tfaber
Date: Wed Mar 30 11:35:22 2016
New Revision: 71081
URL:
http://svn.reactos.org/svn/reactos?rev=71081&view=rev
Log:
[SHELL32]
- Correctly handle desktop pidls in CDesktopFolder::CompareIDs. Based on a patch by
Sylvain Deverre.
CORE-10747 CORE-10801 #resolve
Modified:
trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Wed Mar 30
11:35:22 2016
@@ -463,11 +463,18 @@
*/
HRESULT WINAPI CDesktopFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1,
PCUIDLIST_RELATIVE pidl2)
{
+ bool bIsDesktopFolder1, bIsDesktopFolder2;
+
if (!pidl1 || !pidl2)
{
ERR("Got null pidl pointer (%Ix %p %p)!\n", lParam, pidl1, pidl2);
return E_INVALIDARG;
}
+
+ bIsDesktopFolder1 = _ILIsDesktop(pidl1);
+ bIsDesktopFolder2 = _ILIsDesktop(pidl2);
+ if (bIsDesktopFolder1 || bIsDesktopFolder2)
+ return MAKE_COMPARE_HRESULT(bIsDesktopFolder1 - bIsDesktopFolder2);
if (_ILIsSpecialFolder(pidl1) || _ILIsSpecialFolder(pidl2))
return SHELL32_CompareGuidItems(this, lParam, pidl1, pidl2);