mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
shell32: Mask out attributes we didn't ask for in ShellItem::GetAttributes.
This commit is contained in:
parent
955b487b20
commit
678434539e
@ -269,6 +269,7 @@ static HRESULT WINAPI ShellItem_GetAttributes(IShellItem2 *iface, SFGAOF sfgaoMa
|
||||
child_pidl = ILFindLastID(This->pidl);
|
||||
*psfgaoAttribs = sfgaoMask;
|
||||
ret = IShellFolder_GetAttributesOf(parent_folder, 1, (LPCITEMIDLIST*)&child_pidl, psfgaoAttribs);
|
||||
*psfgaoAttribs &= sfgaoMask;
|
||||
IShellFolder_Release(parent_folder);
|
||||
}
|
||||
|
||||
|
@ -3783,17 +3783,17 @@ static void test_ShellItemGetAttributes(void)
|
||||
sfgao = 0xdeadbeef;
|
||||
hr = IShellItem_GetAttributes(psi_folder1, 0, &sfgao);
|
||||
ok(hr == S_OK, "Got 0x%08x\n", hr);
|
||||
todo_wine ok(sfgao == 0, "Got 0x%08x\n", sfgao);
|
||||
ok(sfgao == 0, "Got 0x%08x\n", sfgao);
|
||||
|
||||
sfgao = 0xdeadbeef;
|
||||
hr = IShellItem_GetAttributes(psi_folder1, SFGAO_FOLDER, &sfgao);
|
||||
ok(hr == S_OK, "Got 0x%08x\n", hr);
|
||||
todo_wine ok(sfgao == SFGAO_FOLDER, "Got 0x%08x\n", sfgao);
|
||||
ok(sfgao == SFGAO_FOLDER, "Got 0x%08x\n", sfgao);
|
||||
|
||||
sfgao = 0xdeadbeef;
|
||||
hr = IShellItem_GetAttributes(psi_file1, SFGAO_FOLDER, &sfgao);
|
||||
todo_wine ok(hr == S_FALSE, "Got 0x%08x\n", hr);
|
||||
todo_wine ok(sfgao == 0, "Got 0x%08x\n", sfgao);
|
||||
ok(sfgao == 0, "Got 0x%08x\n", sfgao);
|
||||
|
||||
IShellItem_Release(psi_folder1);
|
||||
IShellItem_Release(psi_file1);
|
||||
|
Loading…
Reference in New Issue
Block a user