Commit 77c313b8 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

shell32: Set the stream and storage attributes where needed.

parent a77c0ebc
......@@ -1154,7 +1154,10 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci
HeapFree( GetProcessHeap(), 0, dos_name );
}
if (_ILIsFolder(apidl[i]))
*attrs |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
*attrs |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR |
SFGAO_STORAGEANCESTOR | SFGAO_STORAGE;
else
*attrs |= SFGAO_STREAM;
}
}
......
......@@ -388,6 +388,14 @@ static void test_EnumObjects(IShellFolder *iFolder)
SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM,
SFGAO_CAPABILITYMASK | SFGAO_FILESYSTEM,
};
static const ULONG full_attrs[5] =
{
SFGAO_CAPABILITYMASK | SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR,
SFGAO_CAPABILITYMASK | SFGAO_STORAGE | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR,
SFGAO_CAPABILITYMASK | SFGAO_STREAM | SFGAO_FILESYSTEM,
SFGAO_CAPABILITYMASK | SFGAO_STREAM | SFGAO_FILESYSTEM,
SFGAO_CAPABILITYMASK | SFGAO_STREAM | SFGAO_FILESYSTEM,
};
hr = IShellFolder_EnumObjects(iFolder, NULL, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN, &iEnumList);
ok(hr == S_OK, "EnumObjects failed %08x\n", hr);
......@@ -440,6 +448,11 @@ static void test_EnumObjects(IShellFolder *iFolder)
ok(flags == attrs[i] ||
flags == (attrs[i] & ~SFGAO_FILESYSANCESTOR), /* Win9x, NT4 */
"GetAttributesOf[%i] got %08x, expected %08x\n", i, flags, attrs[i]);
flags = ~0u;
hr = IShellFolder_GetAttributesOf(iFolder, 1, (LPCITEMIDLIST*)(idlArr + i), &flags);
ok(hr == S_OK, "GetAttributesOf returns %08x\n", hr);
ok((flags & ~SFGAO_HASSUBFOLDER) == full_attrs[i], "%d: got %08x expected %08x\n", i, flags, full_attrs[i]);
}
for (i=0;i<5;i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment