[SHELL32] Fix regression CORE-12364

The sorting in explorer broke by
SVN r73128 == git
24fcf531e7

Thanks to Doug Lyons for providing this patch.
I do intend to port it back into 0.4.14RC.
This commit is contained in:
Joachim Henze 2020-09-11 02:24:42 +02:00
parent 7d44c1cb07
commit 35dbdaaa0e

View file

@ -474,7 +474,15 @@ HRESULT WINAPI CRegFolder::CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, P
} }
/* Guid folders come first compared to everything else */ /* Guid folders come first compared to everything else */
return MAKE_COMPARE_HRESULT(clsid1 ? -1 : 1); /* And Drives come before folders in My Computer */
if (_ILIsMyComputer(m_pidlRoot))
{
return MAKE_COMPARE_HRESULT(clsid1 ? 1 : -1);
}
else
{
return MAKE_COMPARE_HRESULT(clsid1 ? -1 : 1);
}
} }
HRESULT WINAPI CRegFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) HRESULT WINAPI CRegFolder::CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)