Spice simulator: prevent double quoting library file names

Fixes: lp:1786559
* https://bugs.launchpad.net/kicad/+bug/1786559
This commit is contained in:
Maciej Suminski 2018-08-14 09:46:50 +02:00
parent f0b8b2136a
commit f82b839d06
1 changed files with 9 additions and 0 deletions

View File

@ -405,8 +405,17 @@ void NETLIST_EXPORTER_PSPICE::UpdateDirectives( unsigned aCtl )
wxString lib = directive.AfterFirst( ' ' ); wxString lib = directive.AfterFirst( ' ' );
if( !lib.IsEmpty() ) if( !lib.IsEmpty() )
{
// Strip quotes if present
if( ( lib.StartsWith( "\"" ) && lib.EndsWith( "\"" ) )
|| ( lib.StartsWith( "'" ) && lib.EndsWith( "'" ) ) )
{
lib = lib.Mid( 1, lib.Length() - 2 );
}
m_libraries.insert( lib ); m_libraries.insert( lib );
} }
}
else if( directive.StartsWith( ".title " ) ) else if( directive.StartsWith( ".title " ) )
{ {
m_title = directive.AfterFirst( ' ' ); m_title = directive.AfterFirst( ' ' );