mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
[SHELL32]
- Accept parsing paths like "C:". Also simplify CDrivesFolder::ParseDisplayName a bit. Note: trying to run "c:" from the run dialog doesn't have the right result due to a bug in ShellExecute. svn path=/trunk/; revision=71212
This commit is contained in:
parent
f5eff4b750
commit
61d4bb4dcc
1 changed files with 10 additions and 10 deletions
|
@ -206,7 +206,6 @@ HRESULT WINAPI CDrivesFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLEST
|
||||||
{
|
{
|
||||||
HRESULT hr = E_INVALIDARG;
|
HRESULT hr = E_INVALIDARG;
|
||||||
LPCWSTR szNext = NULL;
|
LPCWSTR szNext = NULL;
|
||||||
WCHAR szElement[MAX_PATH];
|
|
||||||
LPITEMIDLIST pidlTemp = NULL;
|
LPITEMIDLIST pidlTemp = NULL;
|
||||||
|
|
||||||
TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this,
|
TRACE("(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n", this,
|
||||||
|
@ -219,17 +218,18 @@ HRESULT WINAPI CDrivesFolder::ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLEST
|
||||||
|
|
||||||
/* handle CLSID paths */
|
/* handle CLSID paths */
|
||||||
if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':')
|
if (lpszDisplayName[0] == ':' && lpszDisplayName[1] == ':')
|
||||||
{
|
|
||||||
return SH_ParseGuidDisplayName(this, hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
|
return SH_ParseGuidDisplayName(this, hwndOwner, pbc, lpszDisplayName, pchEaten, ppidl, pdwAttributes);
|
||||||
}
|
|
||||||
/* do we have an absolute path name ? */
|
if (PathGetDriveNumberW(lpszDisplayName) < 0)
|
||||||
else if (PathGetDriveNumberW (lpszDisplayName) >= 0 &&
|
return E_INVALIDARG;
|
||||||
lpszDisplayName[2] == (WCHAR) '\\')
|
|
||||||
|
pidlTemp = _ILCreateDrive(lpszDisplayName);
|
||||||
|
if (!pidlTemp)
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
|
if (lpszDisplayName[2] == L'\\')
|
||||||
{
|
{
|
||||||
szNext = GetNextElementW (lpszDisplayName, szElement, MAX_PATH);
|
szNext = &lpszDisplayName[3];
|
||||||
/* make drive letter uppercase to enable PIDL comparison */
|
|
||||||
szElement[0] = toupper(szElement[0]);
|
|
||||||
pidlTemp = _ILCreateDrive (szElement);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (szNext && *szNext)
|
if (szNext && *szNext)
|
||||||
|
|
Loading…
Reference in a new issue