Commit 8130a6eb authored by Michael Jung's avatar Michael Jung Committed by Alexandre Julliard

Return correct attributes in ParseDisplayName.

parent a2479eca
...@@ -771,15 +771,14 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_ParseDisplayName(IShellFolder2* i ...@@ -771,15 +771,14 @@ static HRESULT WINAPI UnixFolder_IShellFolder2_ParseDisplayName(IShellFolder2* i
result = UNIXFS_path_to_pidl(This, lpszDisplayName, ppidl); result = UNIXFS_path_to_pidl(This, lpszDisplayName, ppidl);
if (result && pdwAttributes && *pdwAttributes) if (result && pdwAttributes && *pdwAttributes)
{ {
/* need to traverse to the last element for the attribute */ IShellFolder *pParentSF;
LPCITEMIDLIST pidl, last_pidl; LPCITEMIDLIST pidlLast;
pidl = last_pidl = *ppidl; HRESULT hr;
while(pidl && pidl->mkid.cb)
{ hr = SHBindToParent(This->m_pidlLocation, &IID_IShellFolder, (LPVOID*)&pParentSF, &pidlLast);
last_pidl = pidl; if (FAILED(hr)) return E_FAIL;
pidl = ILGetNext(pidl); IShellFolder_GetAttributesOf(pParentSF, 1, &pidlLast, pdwAttributes);
} IShellFolder_Release(pParentSF);
SHELL32_GetItemAttributes((IShellFolder*)iface, last_pidl, pdwAttributes);
} }
if (!result) TRACE("FAILED!\n"); if (!result) TRACE("FAILED!\n");
......
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