diff --git a/pcbnew/pcb_plotter.cpp b/pcbnew/pcb_plotter.cpp index 298bfb1ff3..075d70e8f5 100644 --- a/pcbnew/pcb_plotter.cpp +++ b/pcbnew/pcb_plotter.cpp @@ -82,10 +82,10 @@ bool PCB_PLOTTER::Plot( const wxString& aOutputPath, const LSEQ& aLayersToPlot, wxString layerName = m_board->GetLayerName( layer ); - wxFileName fn( aOutputPath ); + wxFileName fn; wxFileName brdFn = m_board->GetFileName(); wxString msg; - fn.SetName( brdFn.GetName() ); + fn.Assign( aOutputPath, brdFn.GetName() ); // Use Gerber Extensions based on layer number // (See http://en.wikipedia.org/wiki/Gerber_File)