Zebediah Figura : explorer: Pass the full path to ParseDisplayName().

Alexandre Julliard julliard at winehq.org
Mon May 14 06:54:25 CDT 2018


Module: wine
Branch: stable
Commit: 460492f2b4ad17615cf16075b1a442677fa766af
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=460492f2b4ad17615cf16075b1a442677fa766af

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Mar  6 10:58:24 2018 -0600

explorer: Pass the full path to ParseDisplayName().

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit bd74183b1e9b443e52dedf1842c4721a54f9908e)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 programs/explorer/explorer.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c
index ac5bebb..c509336 100644
--- a/programs/explorer/explorer.c
+++ b/programs/explorer/explorer.c
@@ -24,6 +24,7 @@
 
 #include "wine/unicode.h"
 #include "wine/debug.h"
+#include "wine/heap.h"
 #include "explorer_private.h"
 #include "resource.h"
 
@@ -631,16 +632,26 @@ static IShellFolder* get_starting_shell_folder(parameters_struct* params)
 {
     IShellFolder* desktop,*folder;
     LPITEMIDLIST root_pidl;
+    WCHAR *fullpath = NULL;
     HRESULT hres;
+    DWORD size;
 
     SHGetDesktopFolder(&desktop);
     if (!params->root[0])
     {
         return desktop;
     }
+
+    size = GetFullPathNameW(params->root, 0, fullpath, NULL);
+    if (!size)
+        return desktop;
+    fullpath = heap_alloc(size * sizeof(WCHAR));
+    GetFullPathNameW(params->root, size, fullpath, NULL);
+
     hres = IShellFolder_ParseDisplayName(desktop,NULL,NULL,
-                                         params->root,NULL,
+                                         fullpath,NULL,
                                          &root_pidl,NULL);
+    heap_free(fullpath);
 
     if(FAILED(hres))
     {




More information about the wine-cvs mailing list