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.