https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6cb1e57a630e09ba90a3e…
commit 6cb1e57a630e09ba90a3e0c292beaf5754e0b7de
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Sun Mar 6 15:25:45 2022 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Sun Mar 6 15:25:45 2022 +0900
[SHELL32] Support CSIDL_FLAG_NO_ALIAS (#4381)
Adding the CSIDL_FLAG_NO_ALIAS flag to SHGetSpecialFolderLocation should return the
physical PIDL if possible.
CORE-18079
---
dll/win32/shell32/wine/shellpath.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dll/win32/shell32/wine/shellpath.c b/dll/win32/shell32/wine/shellpath.c
index 736092b20a5..70409260e69 100644
--- a/dll/win32/shell32/wine/shellpath.c
+++ b/dll/win32/shell32/wine/shellpath.c
@@ -2888,6 +2888,9 @@ HRESULT WINAPI SHGetFolderLocation(
LPITEMIDLIST *ppidl)
{
HRESULT hr = E_INVALIDARG;
+#ifdef __REACTOS__
+ WCHAR szPath[MAX_PATH];
+#endif
TRACE("%p 0x%08x %p 0x%08x %p\n",
hwndOwner, nFolder, hToken, dwReserved, ppidl);
@@ -2897,6 +2900,15 @@ HRESULT WINAPI SHGetFolderLocation(
if (dwReserved)
return E_INVALIDARG;
+#ifdef __REACTOS__
+ if ((nFolder & CSIDL_FLAG_NO_ALIAS) &&
+ SHGetSpecialFolderPathW(hwndOwner, szPath, (nFolder & CSIDL_FOLDER_MASK),
FALSE))
+ {
+ *ppidl = ILCreateFromPathW(szPath);
+ if (*ppidl)
+ return S_OK;
+ }
+#endif
/* The virtual folders' locations are not user-dependent */
*ppidl = NULL;
switch (nFolder & CSIDL_FOLDER_MASK)