From fd04a176a4d5611119d7fab61b00ede67fbae32e Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Tue, 5 Jan 2021 16:21:24 -0800 Subject: [PATCH] Remove full path from drill report Leaves just file name in place. Full paths are considered a security risk for some Fixes https://gitlab.com/kicad/code/kicad/issues/6949 --- pcbnew/exporters/gen_drill_report_files.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/exporters/gen_drill_report_files.cpp b/pcbnew/exporters/gen_drill_report_files.cpp index 3b5fcc0612..d073198fe5 100644 --- a/pcbnew/exporters/gen_drill_report_files.cpp +++ b/pcbnew/exporters/gen_drill_report_files.cpp @@ -338,11 +338,11 @@ bool GENDRILL_WRITER_BASE::GenDrillReportFile( const wxString& aFullFileName ) wxASSERT( m_pcb ); unsigned totalHoleCount; - wxString brdFilename = m_pcb->GetFileName(); + wxFileName brdFilename( m_pcb->GetFileName() ); std::vector hole_sets = getUniqueLayerPairs(); - out.Print( 0, "Drill report for %s\n", TO_UTF8( brdFilename ) ); + out.Print( 0, "Drill report for %s\n", TO_UTF8( brdFilename.GetFullName() ) ); out.Print( 0, "Created on %s\n\n", TO_UTF8( DateAndTime() ) ); // Output the cu layer stackup, so layer name references make sense.