Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Src/StartMenu/StartMenuDLL/MenuCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3117,12 +3117,15 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
info.lpVerbW=MAKEINTRESOURCEW(res-verbOffset);
info.nShow=SW_SHOWNORMAL;
bool bOpenTruePath=false;
bool bOpenFolderPath=false;
wchar_t targetlnkPath[_MAX_PATH]; // path to target.lnk in a fake folder
wchar_t dir[_MAX_PATH];
if (SHGetPathFromIDList(pItemPidl1,dir))
{
if (_stricmp(command,"open")==0 && GetSettingBool(L"OpenTruePath") && GetFakeFolder(targetlnkPath,_countof(targetlnkPath),dir))
bOpenTruePath=true;
bOpenTruePath = true;
else if (_stricmp(command,"open")==0 && GetSettingBool(L"OpenTruePath") && ((GetFileAttributes(dir)&FILE_ATTRIBUTE_DIRECTORY)==FILE_ATTRIBUTE_DIRECTORY))
bOpenFolderPath = true;
else
{
PathRemoveFileSpec(dir);
Expand Down Expand Up @@ -3170,6 +3173,12 @@ void CMenuContainer::ActivateItem( int index, TActivateType type, const POINT *p
LOG_MENU(LOG_EXECUTE,L"Invoke command, ptr=%p, res=%d",this,hinst);
executeSuccess=static_cast<int>(reinterpret_cast<uintptr_t>(hinst))>=32;
}
else if (bOpenFolderPath)
{
HINSTANCE hinst = ShellExecute(NULL,NULL,dir,NULL,NULL,SW_SHOWNORMAL);
LOG_MENU(LOG_EXECUTE, L"Invoke command, ptr=%p, res=%d",this,hinst);
executeSuccess = static_cast<int>(reinterpret_cast<uintptr_t>(hinst)) >= 32;
}
else
{
HRESULT hr{};
Expand Down