Fix file not found msg contents for step resolving

This commit is contained in:
Marek Roszko 2024-02-15 23:10:36 -05:00
parent 762c159b96
commit b2c6e2de1f
1 changed files with 5 additions and 1 deletions

View File

@ -249,8 +249,12 @@ bool EXPORTER_STEP::buildFootprint3DShapes( FOOTPRINT* aFootprint, VECTOR2D aOri
wxString mname = m_resolver->ResolvePath( fp_model.m_Filename, footprintBasePath ); wxString mname = m_resolver->ResolvePath( fp_model.m_Filename, footprintBasePath );
if( !wxFileName::FileExists( mname ) ) if( mname.empty() || !wxFileName::FileExists( mname ) )
{ {
// the error path will return an empty name sometimes, at least report back the original filename
if( mname.empty() )
mname = fp_model.m_Filename;
ReportMessage( wxString::Format( wxT( "Could not add 3D model to %s.\n" ReportMessage( wxString::Format( wxT( "Could not add 3D model to %s.\n"
"File not found: %s\n" ), "File not found: %s\n" ),
aFootprint->GetReference(), mname ) ); aFootprint->GetReference(), mname ) );