Fix int ExecuteFile(...) incorrect behavior with quoted filename.
It uses a wxExecute() version that add quotes to filename, so the final filename was incorrect. Fixes #9292 https://gitlab.com/kicad/code/kicad/issues/9292
This commit is contained in:
parent
dd1d36d40a
commit
e96108d3c8
|
@ -140,7 +140,14 @@ int ExecuteFile( const wxString& aEditorName, const wxString& aFileName, wxProce
|
||||||
args[i++] = param.wc_str();
|
args[i++] = param.wc_str();
|
||||||
|
|
||||||
if( !aFileName.IsEmpty() )
|
if( !aFileName.IsEmpty() )
|
||||||
args[i++] = aFileName.wc_str();
|
{
|
||||||
|
wxString name = aFileName;
|
||||||
|
|
||||||
|
// A quoted filename is incorrectly handled here, perhaps because wxExecute
|
||||||
|
// add quotes. So remove quotes if any (they also are illegal in filenames).
|
||||||
|
name.Replace( "\"", "" );
|
||||||
|
args[i++] = name.wc_str();
|
||||||
|
}
|
||||||
|
|
||||||
args[i] = nullptr;
|
args[i] = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue