From 0e1baa6fefcb9c27f7dfa847a7d5dda7854c08a3 Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Sun, 27 Aug 2023 20:08:46 +0200 Subject: [PATCH] CADSTAR Parts Libraries: Correctly handle relative paths to .csa file --- .../sch_plugins/cadstar/cadstar_sch_archive_plugin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_plugin.cpp b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_plugin.cpp index eba5dd0937..e3d3e0a08e 100644 --- a/eeschema/sch_plugins/cadstar/cadstar_sch_archive_plugin.cpp +++ b/eeschema/sch_plugins/cadstar/cadstar_sch_archive_plugin.cpp @@ -261,6 +261,14 @@ void CADSTAR_SCH_ARCHIVE_PLUGIN::ensureLoadedLibrary( const wxString& aLibraryPa if( aProperties->count( "csa" ) ) { csafn = wxFileName( aProperties->at( "csa" ) ); + + if( !csafn.IsAbsolute() ) + { + wxFileName libDir( aLibraryPath ); + libDir.ClearExt(); + libDir.SetName( "" ); + csafn.Normalize( wxPATH_NORM_ALL, libDir.GetAbsolutePath() ); + } } else {