[SHELL32] CDefaultContextMenu must forward the .lnk path (#7264)

Forward the .lnk path (if any) so consrv gets STARTF_TITLEISLINKNAME and can apply console properties and icon from the shortcut.
This commit is contained in:
Whindmar Saksit 2024-08-22 14:34:22 +02:00 committed by GitHub
parent 44662eaf62
commit d009de44ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1357,6 +1357,9 @@ CDefaultContextMenu::InvokePidl(LPCMINVOKECOMMANDINFOEX lpcmi, LPCITEMIDLIST pid
else if (!StrIsNullOrEmpty(lpcmi->lpParameters) && __SHCloneStrAtoW(&pszParamsW, lpcmi->lpParameters))
sei.lpParameters = pszParamsW;
if (!sei.lpClass && (lpcmi->fMask & (CMIC_MASK_HASLINKNAME | CMIC_MASK_HASTITLE)) && unicode)
sei.lpClass = lpcmi->lpTitleW; // Forward .lnk path from CShellLink::DoOpen (for consrv STARTF_TITLEISLINKNAME)
ShellExecuteExW(&sei);
ILFree(pidlFull);