mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:26:02 +00:00
[SHELL32] CFSFolder: Add fallback for failing shell extension
CORE-17673
This commit is contained in:
parent
ad83af36dd
commit
9276b3f1bf
1 changed files with 19 additions and 3 deletions
|
@ -883,10 +883,26 @@ HRESULT WINAPI CFSFolder::BindToObject(
|
||||||
CLSID clsidFolder;
|
CLSID clsidFolder;
|
||||||
if (_ILIsFolder(pidl))
|
if (_ILIsFolder(pidl))
|
||||||
{
|
{
|
||||||
clsidFolder = CLSID_ShellFSFolder;
|
|
||||||
|
|
||||||
if ((pData->uFileAttribs & (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_READONLY)) != 0)
|
if ((pData->uFileAttribs & (FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_READONLY)) != 0)
|
||||||
SHELL32_GetCLSIDForDirectory(pfti.szTargetParsingName, L"CLSID", &clsidFolder);
|
{
|
||||||
|
hr = SHELL32_GetCLSIDForDirectory(pfti.szTargetParsingName, L"CLSID", &clsidFolder);
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
/* We got a GUID from a desktop.ini, let's try it */
|
||||||
|
hr = SHELL32_BindToSF(m_pidlRoot, &pfti, pidl, &clsidFolder, riid, ppvOut);
|
||||||
|
if (SUCCEEDED(hr))
|
||||||
|
{
|
||||||
|
TRACE("-- returning (%p) %08x, (%s)\n", *ppvOut, hr, wine_dbgstr_guid(&clsidFolder));
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Something went wrong, re-try it with a normal ShellFSFolder */
|
||||||
|
ERR("CFSFolder::BindToObject: %s failed to bind, using fallback (0x%08x)\n", wine_dbgstr_guid(&clsidFolder), hr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* No system folder or the custom class failed */
|
||||||
|
clsidFolder = CLSID_ShellFSFolder;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue