diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-05-05 20:21:12 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2024-05-05 20:21:12 (GMT) |
commit | 827fe28571de6e4351929925a4ec5dc4b2906852 (patch) | |
tree | f99f6a297a9741b27900aa542a3b79f52ad0b14c /library | |
parent | 737729922e07fdf7b496541e3ea43f53179b4fa0 (diff) | |
parent | 7180624f9b41ef23d847789e1970d3c57c561858 (diff) | |
download | tcl-827fe28571de6e4351929925a4ec5dc4b2906852.zip tcl-827fe28571de6e4351929925a4ec5dc4b2906852.tar.gz tcl-827fe28571de6e4351929925a4ec5dc4b2906852.tar.bz2 |
Merge 8.6
Diffstat (limited to 'library')
-rw-r--r-- | library/tm.tcl | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/library/tm.tcl b/library/tm.tcl index 75abfb0..53295c8 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -97,8 +97,8 @@ proc ::tcl::tm::add {args} { set newpaths $paths foreach p $args { - if {$p in $newpaths} { - # Ignore a path already on the list. + if {($p eq "") || ($p in $newpaths)} { + # Ignore any path which is empty or already on the list. continue } @@ -335,10 +335,13 @@ proc ::tcl::tm::Defaults {} { foreach ev [::list \ TCL${major}.${n}_TM_PATH \ TCL${major}_${n}_TM_PATH \ - ] { + ] { if {![info exists env($ev)]} continue foreach p [split $env($ev) $sep] { - path add $p + # Paths relative to unresolvable home dirs are ignored + if {![catch {file tildeexpand $p} expanded_path]} { + path add $expanded_path + } } } } |