From 0dea03654b55f558852a679dd849321801ce124a Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Tue, 14 Nov 2023 11:55:51 -0500 Subject: [PATCH] CLI: schematic path needs to be made absolute along with project path --- eeschema/eeschema_helpers.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/eeschema_helpers.cpp b/eeschema/eeschema_helpers.cpp index 482cce389c..63403bcaec 100644 --- a/eeschema/eeschema_helpers.cpp +++ b/eeschema/eeschema_helpers.cpp @@ -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( ... ) {