diff --git a/common/plotters/GERBER_plotter.cpp b/common/plotters/GERBER_plotter.cpp index 1e07ecf14e..6187e4807a 100644 --- a/common/plotters/GERBER_plotter.cpp +++ b/common/plotters/GERBER_plotter.cpp @@ -186,9 +186,8 @@ bool GERBER_PLOTTER::StartPlot() finalFile = outputFile; // the actual gerber file will be created later - // Create a temporary filename to store gerber file - // note tmpfile() does not work under Vista and W7 in user mode - m_workFilename = filename + wxT(".tmp"); + // Create a temp file in system temp to avoid potential network share buffer issues for the final read and save + m_workFilename = wxFileName::CreateTempFileName( "" ); workFile = wxFopen( m_workFilename, wxT( "wt" )); outputFile = workFile; wxASSERT( outputFile ); diff --git a/common/plotters/PDF_plotter.cpp b/common/plotters/PDF_plotter.cpp index cd73078532..9bef072c1f 100644 --- a/common/plotters/PDF_plotter.cpp +++ b/common/plotters/PDF_plotter.cpp @@ -556,7 +556,7 @@ int PDF_PLOTTER::startPdfStream(int handle) "stream\n", handle + 1 ); // Open a temporary file to accumulate the stream - workFilename = filename + wxT(".tmp"); + workFilename = wxFileName::CreateTempFileName( "" ); workFile = wxFopen( workFilename, wxT( "w+b" )); wxASSERT( workFile ); return handle;