remove implicit [pwd] prepending to relative paths given to rel_sym_path. this assumption is incorrect in some cases

This commit is contained in:
stefan schippers 2025-03-13 21:51:06 +01:00
parent e789988b05
commit 9cb435c43c
1 changed files with 9 additions and 9 deletions

View File

@ -7009,15 +7009,15 @@ proc rel_sym_path {symbol {paths {}} } {
if { $paths eq {}} {set paths $pathlist} if { $paths eq {}} {set paths $pathlist}
regsub {^~/} $symbol ${env(HOME)}/ symbol regsub {^~/} $symbol ${env(HOME)}/ symbol
if {$OS eq "Windows"} { # if {$OS eq "Windows"} {
if {![regexp {^[A-Za-z]\:/} $symbol]} { # if {![regexp {^[A-Za-z]\:/} $symbol]} {
set symbol [pwd]/$symbol # set symbol [pwd]/$symbol
} # }
} else { # } else {
if {![regexp {^/} $symbol]} { # if {![regexp {^/} $symbol]} {
set symbol [pwd]/$symbol # set symbol [pwd]/$symbol
} # }
} # }
set curr_dirname [pwd] set curr_dirname [pwd]
set name {} set name {}
foreach path_elem $paths { foreach path_elem $paths {