Remove another use of non-argv wxExecute

(Fixes supplied by mwielgus.)
This commit is contained in:
Jeff Young 2021-10-15 10:38:41 +01:00
parent f9861b4a6c
commit 8a8775bed8
3 changed files with 6 additions and 5 deletions

View File

@ -25,7 +25,8 @@
void LaunchExternal( const wxString& aPath )
{
#ifdef __WXMAC__
wxExecute( wxString::Format( "open \"%s\"", aPath ) );
const wchar_t* args[] = { L"open", L"--args", aPath.wc_str() };
wxExecute( const_cast<wchar_t**>( args ) );
#else
wxString path( aPath );

View File

@ -790,9 +790,9 @@ int KICAD_MANAGER_CONTROL::Execute( const TOOL_EVENT& aEvent )
m_frame->PrintMsg( msg );
#ifdef __WXMAC__
// Use concatenation to avoid double-quote bug in wxWidgets 3.1.5 OSX.
wxExecute( "osascript -e 'activate application \""
+ EscapeString( execFile, CTX_QUOTED_STR ) + "\"' " );
// This non-parameterized use of wxExecute is fine because execFile is not derived
// from user input.
wxExecute( "osascript -e 'activate application \"" + execFile + "\"'" );
#endif
}
else