mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[SHELL32] Fix CFSFolder::CompareIDs.SHFSF_COL_TYPE (#8589)
JIRA issue: CORE-20434 Fix 1st bug of CORE-20434. - In CFSFolder::CompareIDs, implement SHFSF_COL_TYPE, using SHGetFileInfoW.
This commit is contained in:
committed by
GitHub
parent
873abe88a9
commit
ae3aee6ee3
@@ -1133,8 +1133,6 @@ HRESULT WINAPI CFSFolder::CompareIDs(LPARAM lParam,
|
||||
|
||||
LPPIDLDATA pData1 = _ILGetDataPointer(pidl1);
|
||||
LPPIDLDATA pData2 = _ILGetDataPointer(pidl2);
|
||||
LPWSTR pExtension1, pExtension2;
|
||||
|
||||
HRESULT hr = CompareSortFoldersFirst(pidl1, pidl2);
|
||||
if (SUCCEEDED(hr))
|
||||
return hr;
|
||||
@@ -1153,11 +1151,16 @@ HRESULT WINAPI CFSFolder::CompareIDs(LPARAM lParam,
|
||||
result = 0;
|
||||
break;
|
||||
case SHFSF_COL_TYPE:
|
||||
// FIXME: Compare the type strings from SHGetFileInfo
|
||||
pExtension1 = PathFindExtensionW(pszName1);
|
||||
pExtension2 = PathFindExtensionW(pszName2);
|
||||
result = CompareUiStrings(pExtension1, pExtension2, lParam);
|
||||
{
|
||||
SHFILEINFOW info1, info2;
|
||||
enum { flags = SHGFI_PIDL | SHGFI_TYPENAME };
|
||||
if (SHGetFileInfoW((LPCWSTR)pidl1, 0, &info1, sizeof(info1), flags) &&
|
||||
SHGetFileInfoW((LPCWSTR)pidl2, 0, &info2, sizeof(info2), flags))
|
||||
{
|
||||
result = CompareUiStrings(info1.szTypeName, info2.szTypeName, lParam);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SHFSF_COL_MDATE:
|
||||
result = pData1->u.file.uFileDate - pData2->u.file.uFileDate;
|
||||
if (result == 0)
|
||||
|
||||
Reference in New Issue
Block a user