From 169d743b330d02ba74c3f732c5201a26bda5b0d2 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Tue, 12 Nov 2024 20:58:09 +0100 Subject: [PATCH] insert symbols should tolerate paths in XSCHEM_LIBRARY_PATH ending with `/` --- src/xschem.tcl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/xschem.tcl b/src/xschem.tcl index 3c1e051c..f0dc89e4 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -3621,7 +3621,10 @@ proc file_dialog_getresult {loadfile confirm_overwrt} { } elseif { [regexp {^/} $file_dialog_retval]} { set fname $file_dialog_retval } else { - set fname "$file_dialog_dir1/$file_dialog_retval" + if {![regexp {/$} $file_dialog_dir1]} { + append file_dialog_dir1 / + } + set fname "${file_dialog_dir1}${file_dialog_retval}" } if {![file exists "$fname"] } { return "$fname" @@ -6026,7 +6029,10 @@ proc abs_sym_path {fname {ext {} } } { if { ![string compare $path_elem .] && [info exist curr_dirname]} { set path_elem $curr_dirname } - set fullpath "$path_elem/$fname" + if {![regexp {/$} $path_elem]} { + append path_elem / + } + set fullpath "${path_elem}${fname}" if { [file exists $fullpath] } { set name $fullpath break