Commit 8657547d authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

shell32: Fix getting parent shell folder when it's the desktop folder.

BindToObject fails in this case.
parent 642b2fe7
......@@ -143,8 +143,15 @@ static HRESULT ShellItem_get_parent_shellfolder(ShellItem *This, IShellFolder **
ret = SHGetDesktopFolder(&desktop);
if (SUCCEEDED(ret))
{
ret = IShellFolder_BindToObject(desktop, parent_pidl, NULL, &IID_IShellFolder, (void**)ppsf);
IShellFolder_Release(desktop);
if (_ILIsDesktop(parent_pidl))
{
*ppsf = desktop;
}
else
{
ret = IShellFolder_BindToObject(desktop, parent_pidl, NULL, &IID_IShellFolder, (void**)ppsf);
IShellFolder_Release(desktop);
}
}
ILFree(parent_pidl);
}
......
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