From 626f5ac45a7eb98b90174007fa3d78b6491ba0dc Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 14 Aug 2018 09:46:50 +0200 Subject: [PATCH] Spice simulator: prevent double quoting library file names Fixes: lp:1786559 * https://bugs.launchpad.net/kicad/+bug/1786559 (cherry-picked from commit f82b839d) --- eeschema/netlist_exporters/netlist_exporter_pspice.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp index f711cb9344..d108133b4e 100644 --- a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp @@ -405,7 +405,16 @@ void NETLIST_EXPORTER_PSPICE::UpdateDirectives( unsigned aCtl ) wxString lib = directive.AfterFirst( ' ' ); 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 ); + } } else if( directive.StartsWith( ".title " ) ) {