Commit bd74183b authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

explorer: Pass the full path to ParseDisplayName().

parent e864854c
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "wine/unicode.h" #include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
#include "wine/heap.h"
#include "explorer_private.h" #include "explorer_private.h"
#include "resource.h" #include "resource.h"
...@@ -631,16 +632,26 @@ static IShellFolder* get_starting_shell_folder(parameters_struct* params) ...@@ -631,16 +632,26 @@ static IShellFolder* get_starting_shell_folder(parameters_struct* params)
{ {
IShellFolder* desktop,*folder; IShellFolder* desktop,*folder;
LPITEMIDLIST root_pidl; LPITEMIDLIST root_pidl;
WCHAR *fullpath = NULL;
HRESULT hres; HRESULT hres;
DWORD size;
SHGetDesktopFolder(&desktop); SHGetDesktopFolder(&desktop);
if (!params->root[0]) if (!params->root[0])
{ {
return desktop; 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, hres = IShellFolder_ParseDisplayName(desktop,NULL,NULL,
params->root,NULL, fullpath,NULL,
&root_pidl,NULL); &root_pidl,NULL);
heap_free(fullpath);
if(FAILED(hres)) if(FAILED(hres))
{ {
......
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