David Hedberg : shell32: Return S_OK only if the flags matches the result exactly.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Aug 4 15:29:38 CDT 2014
Module: wine
Branch: master
Commit: 9ff6853478db1faad565dbbb414892d033895f43
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9ff6853478db1faad565dbbb414892d033895f43
Author: David Hedberg <david.hedberg at gmail.com>
Date: Wed Jul 30 20:43:22 2014 +0200
shell32: Return S_OK only if the flags matches the result exactly.
---
dlls/shell32/shellitem.c | 5 +++++
dlls/shell32/tests/shlfolder.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c
index 21bf8a5..8236975 100644
--- a/dlls/shell32/shellitem.c
+++ b/dlls/shell32/shellitem.c
@@ -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;
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index fa7219c..4e20251 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -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);
More information about the wine-cvs
mailing list