Michael Jung : unixfs: Fix ParseDisplayName.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Jan 14 10:56:37 CST 2006


Module: wine
Branch: refs/heads/master
Commit: b52146d95fcf3d761632814955d0967d0ec3790e
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=b52146d95fcf3d761632814955d0967d0ec3790e

Author: Michael Jung <mjung at iss.tu-darmstadt.de>
Date:   Sat Jan 14 17:10:53 2006 +0100

unixfs: Fix ParseDisplayName.
Build an absolute pidl to query attributes in
UnixFolder::ParseDisplayName.

---

 dlls/shell32/shfldr_unixfs.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
index e5aee56..7ffdb9a 100644
--- a/dlls/shell32/shfldr_unixfs.c
+++ b/dlls/shell32/shfldr_unixfs.c
@@ -905,12 +905,18 @@ static HRESULT WINAPI UnixFolder_IShellF
     {
         IShellFolder *pParentSF;
         LPCITEMIDLIST pidlLast;
+        LPITEMIDLIST pidlComplete = ILCombine(This->m_pidlLocation, *ppidl);
         HRESULT hr;
         
-        hr = SHBindToParent(*ppidl, &IID_IShellFolder, (LPVOID*)&pParentSF, &pidlLast);
-        if (FAILED(hr)) return E_FAIL;
+        hr = SHBindToParent(pidlComplete, &IID_IShellFolder, (LPVOID*)&pParentSF, &pidlLast);
+        if (FAILED(hr)) {
+            FIXME("SHBindToParent failed! hr = %08lx\n", hr);
+            ILFree(pidlComplete);
+            return E_FAIL;
+        }
         IShellFolder_GetAttributesOf(pParentSF, 1, &pidlLast, pdwAttributes);
         IShellFolder_Release(pParentSF);
+        ILFree(pidlComplete);
     }
 
     if (!result) TRACE("FAILED!\n");
@@ -1272,7 +1278,7 @@ static HRESULT WINAPI UnixFolder_IShellF
     }
     else
     {
-	int len = MultiByteToWideChar(CP_UNIXCP, 0, szDest, -1, NULL, 0);
+        int len = MultiByteToWideChar(CP_UNIXCP, 0, szDest, -1, NULL, 0);
 
         pwszDosDest = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
         MultiByteToWideChar(CP_UNIXCP, 0, szDest, -1, pwszDosDest, len);




More information about the wine-cvs mailing list