From 157c21d3258c486a65e4781d433216428a3746e3 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 23 Sep 2021 13:03:49 +0100 Subject: [PATCH] Only run Unix file handling stuff on Unix. Fixes https://gitlab.com/kicad/code/kicad/issues/9217 --- common/gestfich.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/gestfich.cpp b/common/gestfich.cpp index cacf0b7af5..40169f4c25 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -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;