shell32: UNIX paths should be parsed by unixfs.

Some tests show that trying to create a PIDL from a path starting with
'/' fails in Windows, so this change shouldn't cause a conflict with
the shell namespace.
This commit is contained in:
Andrew Eikum 2010-06-28 12:06:27 -05:00 committed by Alexandre Julliard
parent da31fc06a4
commit a77fb7f550

View File

@ -213,10 +213,24 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
if (*lpszDisplayName)
{
if (*lpszDisplayName == '/')
{
/* UNIX paths should be parsed by unixfs */
IShellFolder *unixFS;
hr = UnixFolder_Constructor(NULL, &IID_IShellFolder, (LPVOID*)&unixFS);
if (SUCCEEDED(hr))
{
hr = IShellFolder_ParseDisplayName(unixFS, NULL, NULL,
lpszDisplayName, NULL, &pidlTemp, NULL);
IShellFolder_Release(unixFS);
}
}
else
{
/* build a complete path to create a simple pidl */
WCHAR szPath[MAX_PATH];
LPWSTR pathPtr;
/* build a complete path to create a simple pidl */
lstrcpynW(szPath, This->sPathTarget, MAX_PATH);
pathPtr = PathAddBackslashW(szPath);
if (pathPtr)
@ -230,6 +244,7 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
}
}
}
else
pidlTemp = _ILCreateMyComputer();