From f3aac428a4b25eea4ce015555675d033fe320bf0 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Sat, 11 Nov 2023 11:30:27 +0100 Subject: [PATCH] fix rel_sym_path when XSCHEM_LIBTRARY_PATH contains paths with trailing `/` --- XSchemWin/XSchemWix/Product.wxs | 10 +++++++--- src/xschem.tcl | 5 ++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/XSchemWin/XSchemWix/Product.wxs b/XSchemWin/XSchemWix/Product.wxs index ff2b2d30..a6bc7102 100644 --- a/XSchemWin/XSchemWix/Product.wxs +++ b/XSchemWin/XSchemWix/Product.wxs @@ -219,6 +219,9 @@ + + + @@ -249,7 +252,7 @@ - + @@ -347,6 +350,7 @@ + @@ -367,8 +371,8 @@ - - + + diff --git a/src/xschem.tcl b/src/xschem.tcl index b36f9ab0..c3729b3a 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -5344,9 +5344,12 @@ proc rel_sym_path {symbol} { if { ![string compare $path_elem .] && [info exist curr_dirname]} { set path_elem $curr_dirname } + if {![regexp {/$} $path_elem]} { + append path_elem / + } set pl [string length $path_elem] if { [string equal -length $pl $path_elem $symbol] } { - set name [string range $symbol [expr {$pl+1}] end] + set name [string range $symbol [expr {$pl}] end] # When $path_elem is "C:/", string equal will match, # but $path_elem should not be removed from $name if $name # has more / for more directory levels.