Use file name rather than path for erc/drc json and text reports

This commit is contained in:
Marek Roszko 2024-02-11 20:12:26 -05:00
parent 622c2f1316
commit d694bb5960
2 changed files with 7 additions and 3 deletions

View File

@ -114,7 +114,8 @@ bool ERC_REPORT::WriteJsonReport( const wxString& aFullFileName )
std::map<KIID, EDA_ITEM*> itemMap; std::map<KIID, EDA_ITEM*> itemMap;
RC_JSON::ERC_REPORT reportHead; RC_JSON::ERC_REPORT reportHead;
reportHead.source = m_sch->GetFileName(); wxFileName fn( m_sch->GetFileName() );
reportHead.source = fn.GetFullName();
reportHead.date = GetISO8601CurrentDateTime(); reportHead.date = GetISO8601CurrentDateTime();
reportHead.kicad_version = GetMajorMinorPatchVersion(); reportHead.kicad_version = GetMajorMinorPatchVersion();
reportHead.coordinate_units = EDA_UNIT_UTILS::GetLabel( m_reportUnits ); reportHead.coordinate_units = EDA_UNIT_UTILS::GetLabel( m_reportUnits );

View File

@ -58,7 +58,8 @@ bool DRC_REPORT::WriteTextReport( const wxString& aFullFileName )
BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings(); BOARD_DESIGN_SETTINGS& bds = m_board->GetDesignSettings();
int count; int count;
fprintf( fp, "** Drc report for %s **\n", TO_UTF8( m_board->GetFileName() ) ); wxFileName fn( m_board->GetFileName() );
fprintf( fp, "** Drc report for %s **\n", TO_UTF8( fn.GetFullName() ) );
fprintf( fp, "** Created on %s **\n", TO_UTF8( GetISO8601CurrentDateTime() ) ); fprintf( fp, "** Created on %s **\n", TO_UTF8( GetISO8601CurrentDateTime() ) );
@ -120,7 +121,9 @@ bool DRC_REPORT::WriteJsonReport( const wxString& aFullFileName )
m_board->FillItemMap( itemMap ); m_board->FillItemMap( itemMap );
RC_JSON::DRC_REPORT reportHead; RC_JSON::DRC_REPORT reportHead;
reportHead.source = m_board->GetFileName();
wxFileName fn( m_board->GetFileName() );
reportHead.source = fn.GetFullName();
reportHead.date = GetISO8601CurrentDateTime(); reportHead.date = GetISO8601CurrentDateTime();
reportHead.kicad_version = GetMajorMinorPatchVersion(); reportHead.kicad_version = GetMajorMinorPatchVersion();
reportHead.coordinate_units = EDA_UNIT_UTILS::GetLabel( m_reportUnits ); reportHead.coordinate_units = EDA_UNIT_UTILS::GetLabel( m_reportUnits );