Only run Unix file handling stuff on Unix.

Fixes https://gitlab.com/kicad/code/kicad/issues/9217
This commit is contained in:
Jeff Young 2021-09-23 13:03:49 +01:00
parent c38de1dcaf
commit 157c21d325
1 changed files with 4 additions and 1 deletions

View File

@ -116,7 +116,9 @@ int ExecuteFile( const wxString& ExecFile, const wxString& param, wxProcess *cal
{
wxString fullFileName;
wxString fullParams;
int space = ExecFile.Find( ' ' );
#ifdef __UNIX__
int space = ExecFile.Find( ' ' );
if( space > 0 && !ExecFile.Contains( "\"" ) && !ExecFile.Contains( "\'" ) )
{
@ -124,6 +126,7 @@ int ExecuteFile( const wxString& ExecFile, const wxString& param, wxProcess *cal
fullParams = ExecFile.Mid( space + 1 ) + wxS( " " ) + param;
}
else
#endif
{
fullFileName = FindKicadFile( ExecFile );
fullParams = param;