[PATCH 2/7] shell32: Mask out attributes we didn't ask for in ShellItem::GetAttributes

David Hedberg david.hedberg at gmail.com
Wed Jul 30 13:43:21 CDT 2014


---
 dlls/shell32/shellitem.c       | 1 +
 dlls/shell32/tests/shlfolder.c | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c
index f58c566..21bf8a5 100644
--- a/dlls/shell32/shellitem.c
+++ b/dlls/shell32/shellitem.c
@@ -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);
     }
 
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index d3b965b..fa7219c 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -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);
-- 
2.0.1




More information about the wine-patches mailing list