Return 'My Compuer' PIDL when calling Desktop->ParseDisplayName() with
empty path string.
This commit is contained in:
parent
0472291e4c
commit
2745769035
|
@ -229,12 +229,17 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
|
||||||
} else {
|
} else {
|
||||||
/* it's a filesystem path on the desktop. Let a FSFolder parse it */
|
/* it's a filesystem path on the desktop. Let a FSFolder parse it */
|
||||||
|
|
||||||
/* build a complete path to create a simple pidl */
|
if (*lpszDisplayName) {
|
||||||
lstrcpyA(szPath, This->sPathTarget);
|
/* build a complete path to create a simple pidl */
|
||||||
PathAddBackslashA(szPath);
|
lstrcpyA(szPath, This->sPathTarget);
|
||||||
len = lstrlenA(szPath);
|
PathAddBackslashA(szPath);
|
||||||
WideCharToMultiByte(CP_ACP, 0, lpszDisplayName, -1, szPath + len, MAX_PATH - len, NULL, NULL);
|
len = lstrlenA(szPath);
|
||||||
pidlTemp = _ILCreateFromPathA(szPath);
|
WideCharToMultiByte(CP_ACP, 0, lpszDisplayName, -1, szPath + len, MAX_PATH - len, NULL, NULL);
|
||||||
|
pidlTemp = _ILCreateFromPathA(szPath);
|
||||||
|
} else {
|
||||||
|
pidlTemp = _ILCreateMyComputer();
|
||||||
|
}
|
||||||
|
|
||||||
szNext = NULL;
|
szNext = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue