Commit 50706777 authored by jean-pierre charras's avatar jean-pierre charras

Kicad: fix 2 issues when a project path or a file has spaces in name.

parent bf5c8f55
......@@ -18,6 +18,7 @@
#include "bitmaps.h"
#include "confirm.h"
#include "gestfich.h"
#include "macros.h"
#include "kicad.h"
#include "prjconfig.h"
......@@ -168,7 +169,8 @@ void WinEDA_MainFrame::OnArchiveFiles( wxCommandEvent& event )
if( ExecuteFile( this, ZIPPER, cmd ) >= 0 )
{
wxString msg;
msg.Printf( _("\nCreate Zip Archive <%s>" ), zip.GetFullName().GetData() );
wxString filename = QuoteFullPath(zip);
msg.Printf( _("\nZip archive <%s> created" ), GetChars( filename ) );
PrintMsg( msg );
PrintMsg( wxT( "\n** end **\n" ) );
}
......
......@@ -207,9 +207,10 @@ void WinEDA_MainFrame::OnRunEeschema( wxCommandEvent& event )
void WinEDA_MainFrame::OnRunGerbview( wxCommandEvent& event )
{
wxFileName fn( m_ProjectFileName );
wxString path = wxT("\"");
path += fn.GetPath( wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME ) + wxT("\"");
ExecuteFile( this, GERBVIEW_EXE,
fn.GetPath( wxPATH_GET_SEPARATOR | wxPATH_GET_VOLUME ) );
ExecuteFile( this, GERBVIEW_EXE, path );
}
......@@ -238,8 +239,10 @@ void WinEDA_MainFrame::OnOpenFileInTextEditor( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_CANCEL )
return;
wxString filename = wxT("\"");
filename += dlg.GetPath() + wxT("\"");
if( !dlg.GetPath().IsEmpty() && !wxGetApp().GetEditorName().IsEmpty() )
ExecuteFile( this, wxGetApp().GetEditorName(), dlg.GetPath() );
ExecuteFile( this, wxGetApp().GetEditorName(), filename );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment