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

@ -145,7 +145,7 @@ int ExecuteFile( const wxString& aEditorName, const wxString& aFileName, wxProce
args[i] = nullptr; args[i] = nullptr;
return wxExecute( const_cast< wchar_t**>( args ), wxEXEC_ASYNC, aCallback ); return wxExecute( const_cast<wchar_t**>( args ), wxEXEC_ASYNC, aCallback );
} }
wxString msg; wxString msg;

View File

@ -25,7 +25,8 @@
void LaunchExternal( const wxString& aPath ) void LaunchExternal( const wxString& aPath )
{ {
#ifdef __WXMAC__ #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 #else
wxString path( aPath ); wxString path( aPath );

View File

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