7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 15:10:12 +00:00

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

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( ... )
{