shell32: Return S_OK only if the flags matches the result exactly.

This commit is contained in:
David Hedberg 2014-07-30 20:43:22 +02:00 committed by Alexandre Julliard
parent 678434539e
commit 9ff6853478
2 changed files with 6 additions and 1 deletions

View File

@ -271,6 +271,11 @@ static HRESULT WINAPI ShellItem_GetAttributes(IShellItem2 *iface, SFGAOF sfgaoMa
ret = IShellFolder_GetAttributesOf(parent_folder, 1, (LPCITEMIDLIST*)&child_pidl, psfgaoAttribs);
*psfgaoAttribs &= sfgaoMask;
IShellFolder_Release(parent_folder);
if(sfgaoMask == *psfgaoAttribs)
return S_OK;
else
return S_FALSE;
}
return ret;

View File

@ -3792,7 +3792,7 @@ static void test_ShellItemGetAttributes(void)
sfgao = 0xdeadbeef;
hr = IShellItem_GetAttributes(psi_file1, SFGAO_FOLDER, &sfgao);
todo_wine ok(hr == S_FALSE, "Got 0x%08x\n", hr);
ok(hr == S_FALSE, "Got 0x%08x\n", hr);
ok(sfgao == 0, "Got 0x%08x\n", sfgao);
IShellItem_Release(psi_folder1);