CADSTAR Parts Libraries: Correctly handle relative paths to .csa file

This commit is contained in:
Roberto Fernandez Bautista 2023-08-27 20:08:46 +02:00
parent 7037076360
commit 0e1baa6fef
1 changed files with 8 additions and 0 deletions

View File

@ -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
{