From 0f8bd6db55d50a4632d72e1cbff8944629da1a64 Mon Sep 17 00:00:00 2001 From: Martin Fuchs Date: Wed, 21 Jan 2004 20:49:13 +0000 Subject: [PATCH] return 'My Compuer' PIDL for Desktop->ParseDisplayName() svn path=/trunk/; revision=7817 --- reactos/lib/shell32/shfldr_desktop.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/reactos/lib/shell32/shfldr_desktop.c b/reactos/lib/shell32/shfldr_desktop.c index 81c31a9dc80..9eb17dc74e9 100644 --- a/reactos/lib/shell32/shfldr_desktop.c +++ b/reactos/lib/shell32/shfldr_desktop.c @@ -227,12 +227,17 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface, } else { /* it's a filesystem path on the desktop. Let a FSFolder parse it */ - /* build a complete path to create a simple pidl */ - lstrcpyA(szPath, This->sPathTarget); - PathAddBackslashA(szPath); - len = lstrlenA(szPath); - WideCharToMultiByte(CP_ACP, 0, lpszDisplayName, -1, szPath + len, MAX_PATH - len, NULL, NULL); - pidlTemp = _ILCreateFromPathA(szPath); + if (*lpszDisplayName) { + /* build a complete path to create a simple pidl */ + lstrcpyA(szPath, This->sPathTarget); + PathAddBackslashA(szPath); + len = lstrlenA(szPath); + WideCharToMultiByte(CP_ACP, 0, lpszDisplayName, -1, szPath + len, MAX_PATH - len, NULL, NULL); + pidlTemp = _ILCreateFromPathA(szPath); + } else { + pidlTemp = _ILCreateMyComputer(); + } + szNext = NULL; }