Resolve using env/project if lib isn't found

Relative include commands resolve in the following order:

1. local to the file from which they are included
2. local to the project
3. local to the SPICE_LIB_DIR directory

Fixes https://gitlab.com/kicad/code/kicad/issues/13083
This commit is contained in:
Seth Hillbrand 2022-12-15 09:39:00 -08:00
parent c66dc035c7
commit bb7682f913
1 changed files with 5 additions and 0 deletions

View File

@ -115,6 +115,11 @@ SIM_LIBRARY& SIM_LIB_MGR::SetLibrary( const wxString& aLibraryPath, REPORTER* aR
try
{
wxFileName fn( fullPath );
if( !fn.Exists() )
fullPath = aLibPath;
fullPath = ResolveLibraryPath( fullPath, m_project );
}
catch( ... )