[SHELL32] Opening Special Folder shortcut (#6546)

Fix opening special folder.
JIRA issue: CORE-19464
In CShellLink::DoOpen, if there is a PIDL, then use it and set SEE_MASK_IDLIST flag.
This commit is contained in:
Katayama Hirofumi MZ 2024-02-28 12:17:04 +09:00 committed by GitHub
parent d1ac33a9bd
commit d634ef54e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2627,11 +2627,19 @@ HRESULT CShellLink::DoOpen(LPCMINVOKECOMMANDINFO lpici)
sei.cbSize = sizeof(sei);
sei.fMask = SEE_MASK_HASLINKNAME | SEE_MASK_UNICODE |
(lpici->fMask & (SEE_MASK_NOASYNC | SEE_MASK_ASYNCOK | SEE_MASK_FLAG_NO_UI));
sei.lpFile = path;
if (m_pPidl)
{
sei.lpIDList = m_pPidl;
sei.fMask |= SEE_MASK_IDLIST;
}
else
{
sei.lpFile = path;
sei.lpParameters = args;
}
sei.lpClass = m_sLinkPath;
sei.nShow = m_Header.nShowCommand;
sei.lpDirectory = m_sWorkDir;
sei.lpParameters = args;
sei.lpVerb = L"open";
// HACK for ShellExecuteExW