@ -137,8 +137,10 @@ bool PROJECT_ARCHIVER::Archive( const wxString& aSrcDir, const wxString& aDestFi
wxT ( " *.stp " ) , wxT ( " *.step " ) , // 3d files
wxT ( " *.stp " ) , wxT ( " *.step " ) , // 3d files
wxT ( " *.wrl " ) ,
wxT ( " *.wrl " ) ,
wxT ( " *.g? " ) , wxT ( " *.g?? " ) , // Gerber files
wxT ( " *.g? " ) , wxT ( " *.g?? " ) , // Gerber files
wxT ( " *.gm?? " ) , // Some gerbers like .gm12 (from protel export)
wxT ( " *.gbrjob " ) , // Gerber job files
wxT ( " *.gbrjob " ) , // Gerber job files
wxT ( " *.pos " ) , wxT ( " *.drl " ) , wxT ( " *.nc " ) , wxT ( " *.xnc " ) , // Fab files
wxT ( " *.pos " ) , // our position files
wxT ( " *.drl " ) , wxT ( " *.nc " ) , wxT ( " *.xnc " ) , // Fab drill files
wxT ( " *.d356 " ) ,
wxT ( " *.d356 " ) ,
wxT ( " *.rpt " ) ,
wxT ( " *.rpt " ) ,
wxT ( " *.net " ) ,
wxT ( " *.net " ) ,
@ -197,8 +199,18 @@ bool PROJECT_ARCHIVER::Archive( const wxString& aSrcDir, const wxString& aDestFi
unsigned long uncompressedBytes = 0 ;
unsigned long uncompressedBytes = 0 ;
// Our filename collector can store duplicate filenames. for instance *.gm2
// matches both *.g?? and *.gm??.
// So skip duplicate filenames (they are sorted, so it is easy.
wxString lastStoredFile ;
for ( unsigned ii = 0 ; ii < files . GetCount ( ) ; ii + + )
for ( unsigned ii = 0 ; ii < files . GetCount ( ) ; ii + + )
{
{
if ( lastStoredFile = = files [ ii ] ) // duplicate name: already stored
continue ;
lastStoredFile = files [ ii ] ;
wxFileSystem fsfile ;
wxFileSystem fsfile ;
wxFileName curr_fn ( files [ ii ] ) ;
wxFileName curr_fn ( files [ ii ] ) ;