mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 13:01:40 +00:00
[BROWSEUI] Accept environment variables on auto-completion
Expand %WINDIR%, %SystemRoot% etc. at CACListISF::Expand. CORE-9281
This commit is contained in:
parent
a5950308fd
commit
badcfb2f7d
1 changed files with 9 additions and 0 deletions
|
@ -331,6 +331,14 @@ STDMETHODIMP CACListISF::Expand(LPCOLESTR pszExpand)
|
|||
m_szExpand = pszExpand;
|
||||
m_iNextLocation = LT_DIRECTORY;
|
||||
|
||||
// expand environment variables (%WINDIR% etc.)
|
||||
WCHAR szExpanded[MAX_PATH];
|
||||
if (wcschr(pszExpand, L'%') != NULL &&
|
||||
ExpandEnvironmentStringsW(pszExpand, szExpanded, _countof(szExpanded)))
|
||||
{
|
||||
pszExpand = szExpanded;
|
||||
}
|
||||
|
||||
// get full path
|
||||
WCHAR szPath1[MAX_PATH], szPath2[MAX_PATH];
|
||||
if (PathIsRelativeW(pszExpand) &&
|
||||
|
@ -427,3 +435,4 @@ STDMETHODIMP CACListISF::SetDirectory(LPCWSTR pwzPath)
|
|||
m_pidlCurDir.Attach(pidl);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue