mirror of
https://github.com/reactos/wine.git
synced 2025-02-19 04:18:09 +00:00
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:
parent
da31fc06a4
commit
a77fb7f550
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user