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

BindToObject fails in this case.
oldstable
Vincent Povirk 2015-08-14 14:55:20 -05:00 committed by Alexandre Julliard
parent 642b2fe789
commit 8657547d9e
1 changed files with 9 additions and 2 deletions

View File

@ -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);
}