https://git.reactos.org/?p=reactos.git;a=commitdiff;h=35dbdaaa0ee79f4fb064b…
commit 35dbdaaa0ee79f4fb064bc10446b75961369168e
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Fri Sep 11 02:24:42 2020 +0200
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Fri Sep 11 02:24:42 2020 +0200
[SHELL32] Fix regression CORE-12364
The sorting in explorer broke by
SVN r73128 == git
24fcf531e78423b314a2d6a4ac750df69e478e3a
Thanks to Doug Lyons for providing this patch.
I do intend to port it back into 0.4.14RC.
---
dll/win32/shell32/folders/CRegFolder.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dll/win32/shell32/folders/CRegFolder.cpp
b/dll/win32/shell32/folders/CRegFolder.cpp
index 6398109247d..6dc12770212 100644
--- a/dll/win32/shell32/folders/CRegFolder.cpp
+++ b/dll/win32/shell32/folders/CRegFolder.cpp
@@ -474,7 +474,15 @@ HRESULT WINAPI CRegFolder::CompareIDs(LPARAM lParam,
PCUIDLIST_RELATIVE pidl1, P
}
/* 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)