https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fefac1fb1df1f084afdb2…
commit fefac1fb1df1f084afdb21e70e1148e3483d8507
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Apr 5 22:20:01 2021 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Mon Apr 5 22:20:01 2021 +0900
[BROWSEUI] Accept environment variables in ACLO_FILESYSDIRS
Properly handle ACLO_FILESYSDIRS. CORE-9281
---
dll/win32/browseui/aclistisf.cpp | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/dll/win32/browseui/aclistisf.cpp b/dll/win32/browseui/aclistisf.cpp
index 4ddeb8f2207..cd087ec2f3f 100644
--- a/dll/win32/browseui/aclistisf.cpp
+++ b/dll/win32/browseui/aclistisf.cpp
@@ -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;