[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:
Charles Ambrye 2020-04-18 22:34:08 -07:00 committed by Giannis Adamopoulos
parent 4af7888b29
commit b8f4f22ba2

View file

@ -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);