From c51b4474e557972e34600c42909a76895da3bc26 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Thu, 21 Mar 2024 15:48:48 +0100 Subject: [PATCH] correctly resolve absolute paths for 2nd...Nth files given on cmdline that use ./ or ../ relative paths --- src/scheduler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scheduler.c b/src/scheduler.c index 2cc3d72d..784afe94 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -2669,6 +2669,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg if(argc > 2) { my_snprintf(f, S(f),"regsub {^~/} {%s} {%s/}", argv[2], home_dir); tcleval(f); + tclvareval("file normalize {", tclresult(), "}", NULL); my_strncpy(f, abs_sym_path(tclresult(), ""), S(f)); } else { tcleval("load_file_dialog {Load file} *.\\{sch,sym,tcl\\} INITIALLOADDIR"); @@ -2680,7 +2681,7 @@ int xschem(ClientData clientdata, Tcl_Interp *interp, int argc, const char * arg } if(!cancel) { if(f[0]) { - dbg(0, "f=%s\n", f); + dbg(1, "f=%s\n", f); new_schematic("create", "noconfirm", f, 1); tclvareval("update_recent_file {", f, "}", NULL); } else {