Commit da31fc06 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

shell32: Use ParseURL to detect URLs.

parent ff08a686
......@@ -152,6 +152,7 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
WCHAR szElement[MAX_PATH];
LPCWSTR szNext = NULL;
LPITEMIDLIST pidlTemp = NULL;
PARSEDURLW urldata;
HRESULT hr = S_OK;
CLSID clsid;
......@@ -167,6 +168,8 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
if (pchEaten)
*pchEaten = 0; /* strange but like the original */
urldata.cbSize = sizeof(urldata);
if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':')
{
szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
......@@ -193,13 +196,8 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
*ppidl = pidlTemp;
return S_OK;
}
else if (strchrW(lpszDisplayName,':'))
else if (SUCCEEDED(ParseURLW(lpszDisplayName, &urldata)))
{
PARSEDURLW urldata;
urldata.cbSize = sizeof(urldata);
ParseURLW(lpszDisplayName,&urldata);
if (urldata.nScheme == URL_SCHEME_SHELL) /* handle shell: urls */
{
TRACE ("-- shell url: %s\n", debugstr_w(urldata.pszSuffix));
......
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