winefile: Fix absolute pidl conversion for non-filesystem shell objects.

This commit is contained in:
Owen Rudge 2008-07-26 00:34:15 +01:00 committed by Alexandre Julliard
parent 2b287a4489
commit 021850c0b8

View file

@ -867,20 +867,14 @@ static LPITEMIDLIST get_path_pidl(LPTSTR path, HWND hwnd)
static LPITEMIDLIST get_to_absolute_pidl(Entry* entry, HWND hwnd)
{
if (entry->up && entry->up->etype==ET_SHELL) {
IShellFolder* folder = entry->up->folder;
WCHAR buffer[MAX_PATH];
LPITEMIDLIST idl = NULL;
HRESULT hr = path_from_pidlW(folder, entry->pidl, buffer, MAX_PATH);
if (SUCCEEDED(hr)) {
LPITEMIDLIST pidl;
ULONG len;
hr = IShellFolder_ParseDisplayName(Globals.iDesktop, hwnd, NULL, buffer, &len, &pidl, NULL);
if (SUCCEEDED(hr))
return pidl;
while (entry->up) {
idl = ILCombine(ILClone(entry->pidl), idl);
entry = entry->up;
}
return idl;
} else if (entry->etype == ET_WINDOWS) {
TCHAR path[MAX_PATH];