CLI: schematic path needs to be made absolute along with project path

This commit is contained in:
Jon Evans 2023-11-14 11:55:51 -05:00
parent b1a044e22a
commit 0dea03654b
1 changed files with 4 additions and 1 deletions

View File

@ -126,9 +126,12 @@ SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( wxString& aFileName, SCH_IO_MGR::SCH
SCHEMATIC* schematic = new SCHEMATIC( project );
wxFileName schFile = aFileName;
schFile.MakeAbsolute();
try
{
schematic->SetRoot( pi->LoadSchematicFile( aFileName, schematic ) );
schematic->SetRoot( pi->LoadSchematicFile( schFile.GetFullPath(), schematic ) );
}
catch( ... )
{