Commit 021850c0 authored by Owen Rudge's avatar Owen Rudge Committed by Alexandre Julliard

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

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