https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fe41acdc11592659f78ba…
commit fe41acdc11592659f78ba66180b810eb6ff34c54
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Sep 27 15:47:10 2020 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Sun Sep 27 15:47:10 2020 +0900
[SHLWAPI] Follow-up of #3230 (f496a5f)
CORE-9281
---
dll/win32/shlwapi/autocomp.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dll/win32/shlwapi/autocomp.cpp b/dll/win32/shlwapi/autocomp.cpp
index bc2c3ca3f14..da045a7f309 100644
--- a/dll/win32/shlwapi/autocomp.cpp
+++ b/dll/win32/shlwapi/autocomp.cpp
@@ -42,7 +42,7 @@ AutoComplete_AddMRU(CComPtr<IObjMgr> pManager, LPCWSTR pszKey)
}
static HRESULT
-IUnknown_SetOptions(CComPtr<IUnknown> punk, DWORD dwACLO)
+IUnknown_AddOptions(CComPtr<IUnknown> punk, DWORD dwACLO)
{
CComPtr<IACList2> pList;
HRESULT hr = punk->QueryInterface(IID_IACList2, (LPVOID *)&pList);
@@ -52,7 +52,10 @@ IUnknown_SetOptions(CComPtr<IUnknown> punk, DWORD dwACLO)
return hr;
}
- hr = pList->SetOptions(dwACLO);
+ DWORD dwOptions = 0;
+ pList->GetOptions(&dwOptions);
+ dwOptions |= dwACLO;
+ hr = pList->SetOptions(dwOptions);
if (FAILED(hr))
ERR("pList->SetOptions failed: 0x%08lX\n", hr);
return hr;
@@ -97,8 +100,8 @@ AutoComplete_LoadList(DWORD dwSHACF, DWORD dwACLO)
if (SUCCEEDED(hr))
{
pManager->Append(pHistory); // Add to the manager
- // Set ACLO_* options
- IUnknown_SetOptions(pHistory, dwACLO | ACLO_CURRENTDIR | ACLO_MYCOMPUTER);
+ // Add ACLO_* options
+ IUnknown_AddOptions(pHistory, dwACLO);
}
else
{
@@ -115,8 +118,8 @@ AutoComplete_LoadList(DWORD dwSHACF, DWORD dwACLO)
if (SUCCEEDED(hr))
{
pManager->Append(pISF); // Add to the manager
- // Set ACLO_* options
- IUnknown_SetOptions(pISF, dwACLO | ACLO_CURRENTDIR | ACLO_MYCOMPUTER);
+ // Add ACLO_* options
+ IUnknown_AddOptions(pISF, dwACLO);
}
else
{