Commit 021becb4 authored by jean-pierre charras's avatar jean-pierre charras

Kicad: bug fix: in zip project command: filenames are now quoted in command...

Kicad: bug fix: in zip project command: filenames are now quoted in command string. Previously if files have space or other exotic character in name, zip fails.
parent 3e0921ea
...@@ -135,7 +135,7 @@ void WinEDA_MainFrame::OnArchiveFiles( wxCommandEvent& event ) ...@@ -135,7 +135,7 @@ void WinEDA_MainFrame::OnArchiveFiles( wxCommandEvent& event )
}; };
wxString cmd = wxT( "-o " ); // run minizip with option -o (overwrite) wxString cmd = wxT( "-o " ); // run minizip with option -o (overwrite)
cmd += zip.GetFullPath(); cmd += QuoteFullPath(zip);
wxString currdirname = wxT( "." ); wxString currdirname = wxT( "." );
currdirname += zip.GetPathSeparator(); currdirname += zip.GetPathSeparator();
...@@ -153,9 +153,9 @@ void WinEDA_MainFrame::OnArchiveFiles( wxCommandEvent& event ) ...@@ -153,9 +153,9 @@ void WinEDA_MainFrame::OnArchiveFiles( wxCommandEvent& event )
while( cont ) while( cont )
{ {
wxFileName fn( f ); wxFileName fn( f );
cmd += wxT( " " ); wxString filename = QuoteFullPath(fn);
cmd += fn.GetFullName(); cmd += wxT( " " ) + filename;
PrintMsg( _( "Compress file " ) + fn.GetFullName() + wxT( "\n" ) ); PrintMsg( _( "Archive file " ) + filename + wxT( "\n" ) );
cont = dir.GetNext( &f ); cont = dir.GetNext( &f );
} }
} }
......
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