shell32: The attributes is not an array, so don't label it as such.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2016-01-28 15:32:49 +00:00 committed by Alexandre Julliard
parent 805b5e36a9
commit a77c0ebc80

View File

@ -1123,23 +1123,23 @@ static HRESULT WINAPI ShellFolder2_CreateViewObject(IShellFolder2* iface, HWND h
} }
static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT cidl, static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT cidl,
LPCITEMIDLIST* apidl, SFGAOF* rgfInOut) LPCITEMIDLIST* apidl, SFGAOF* attrs)
{ {
UnixFolder *This = impl_from_IShellFolder2(iface); UnixFolder *This = impl_from_IShellFolder2(iface);
HRESULT hr = S_OK; HRESULT hr = S_OK;
TRACE("(%p)->(%u %p %p)\n", This, cidl, apidl, rgfInOut); TRACE("(%p)->(%u %p %p)\n", This, cidl, apidl, attrs);
if (!rgfInOut || (cidl && !apidl)) if (!attrs || (cidl && !apidl))
return E_INVALIDARG; return E_INVALIDARG;
if (cidl == 0) { if (cidl == 0) {
*rgfInOut &= This->m_dwAttributes; *attrs &= This->m_dwAttributes;
} else { } else {
char szAbsolutePath[FILENAME_MAX], *pszRelativePath; char szAbsolutePath[FILENAME_MAX], *pszRelativePath;
UINT i; UINT i;
*rgfInOut = SFGAO_CANCOPY|SFGAO_CANMOVE|SFGAO_CANLINK|SFGAO_CANRENAME|SFGAO_CANDELETE| *attrs = SFGAO_CANCOPY | SFGAO_CANMOVE | SFGAO_CANLINK | SFGAO_CANRENAME | SFGAO_CANDELETE |
SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM; SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM;
lstrcpyA(szAbsolutePath, This->m_pszPath); lstrcpyA(szAbsolutePath, This->m_pszPath);
pszRelativePath = szAbsolutePath + lstrlenA(szAbsolutePath); pszRelativePath = szAbsolutePath + lstrlenA(szAbsolutePath);
@ -1149,12 +1149,12 @@ static HRESULT WINAPI ShellFolder2_GetAttributesOf(IShellFolder2* iface, UINT ci
if (!UNIXFS_filename_from_shitemid(apidl[i], pszRelativePath)) if (!UNIXFS_filename_from_shitemid(apidl[i], pszRelativePath))
return E_INVALIDARG; return E_INVALIDARG;
if (!(dos_name = wine_get_dos_file_name( szAbsolutePath ))) if (!(dos_name = wine_get_dos_file_name( szAbsolutePath )))
*rgfInOut &= ~SFGAO_FILESYSTEM; *attrs &= ~SFGAO_FILESYSTEM;
else else
HeapFree( GetProcessHeap(), 0, dos_name ); HeapFree( GetProcessHeap(), 0, dos_name );
} }
if (_ILIsFolder(apidl[i])) if (_ILIsFolder(apidl[i]))
*rgfInOut |= SFGAO_FOLDER|SFGAO_HASSUBFOLDER|SFGAO_FILESYSANCESTOR; *attrs |= SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
} }
} }