mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:46:13 +00:00
[BROWSEUI] Attempt to parse absolute path even if relative path gets an unexpected failure
Some 'BindToObject' methods are incomplete, and in some cases relative paths are simply not possible (especially in special folders such as the desktop)
This commit is contained in:
parent
4af7888b29
commit
b8f4f22ba2
1 changed files with 3 additions and 2 deletions
|
@ -146,11 +146,11 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow(long paramC)
|
|||
|
||||
hr = pbs->GetPidl(&pidlCurrent);
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
goto cleanup;
|
||||
goto parseabsolute;
|
||||
|
||||
hr = psfDesktop->BindToObject(pidlCurrent, NULL, IID_PPV_ARG(IShellFolder, &psfCurrent));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
goto cleanup;
|
||||
goto parseabsolute;
|
||||
|
||||
hr = psfCurrent->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidlRelative, &attributes);
|
||||
if (SUCCEEDED(hr))
|
||||
|
@ -160,6 +160,7 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow(long paramC)
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
parseabsolute:
|
||||
/* We couldn't parse a relative path, attempt to parse an absolute path */
|
||||
hr = psfDesktop->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidlLastParsed, &attributes);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue