[BROWSEUI] Accept environment variables in ACLO_FILESYSDIRS

Properly handle ACLO_FILESYSDIRS. CORE-9281
This commit is contained in:
Katayama Hirofumi MZ 2021-04-05 22:20:01 +09:00
parent d8c38c4b4c
commit fefac1fb1d

View file

@ -260,8 +260,21 @@ STDMETHODIMP CACListISF::Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
}
}
if ((m_dwOptions & ACLO_FILESYSDIRS) && !PathIsDirectoryW(pszPathName))
continue;
if (m_dwOptions & ACLO_FILESYSDIRS)
{
if (wcschr(pszPathName, L'%') != NULL)
{
WCHAR szPath[MAX_PATH];
ExpandEnvironmentStringsW(pszPathName, szPath, _countof(szPath));
if (!PathIsDirectoryW(szPath))
continue;
}
else
{
if (!PathIsDirectoryW(pszPathName))
continue;
}
}
hr = S_OK;
break;