Owen Rudge : winefile: Fix absolute pidl conversion for non-filesystem shell objects.
Alexandre Julliard
julliard at winehq.org
Mon Jul 28 08:06:55 CDT 2008
Module: wine
Branch: master
Commit: 021850c0b8364b2fb814d072bccea4efbba9d212
URL: http://source.winehq.org/git/wine.git/?a=commit;h=021850c0b8364b2fb814d072bccea4efbba9d212
Author: Owen Rudge <owen at owenrudge.net>
Date: Sat Jul 26 00:34:15 2008 +0100
winefile: Fix absolute pidl conversion for non-filesystem shell objects.
---
programs/winefile/winefile.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index 311d580..a51c80b 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -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];
More information about the wine-cvs
mailing list