diff options
author | andreas_kupries <akupries@shaw.ca> | 2008-06-25 16:42:02 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2008-06-25 16:42:02 (GMT) |
commit | 6fbb4c3a1efe27c05d7bcaac74afe47493148750 (patch) | |
tree | 5b24912c8c3609816579300b3161851624b2273b /library/tm.tcl | |
parent | 9236643dd5c1cbe619b563f67eefc3f80b3b7e87 (diff) | |
download | tcl-6fbb4c3a1efe27c05d7bcaac74afe47493148750.zip tcl-6fbb4c3a1efe27c05d7bcaac74afe47493148750.tar.gz tcl-6fbb4c3a1efe27c05d7bcaac74afe47493148750.tar.bz2 |
* library/tm.tcl: Modified the handling of Tcl Modules and of the
* library/safe.tcl: Safe Base to interact nicely with each other,
* library/init.tcl: enabling requiring Tcl Modules in safe
interpreters. Fixes [Bug 1999119].
Diffstat (limited to 'library/tm.tcl')
-rw-r--r-- | library/tm.tcl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/library/tm.tcl b/library/tm.tcl index aee74f5..4f58d12 100644 --- a/library/tm.tcl +++ b/library/tm.tcl @@ -214,11 +214,11 @@ proc ::tcl::tm::UnknownHandler {original name args} { set satisfied 0 foreach path $paths { - if {![file exists $path]} { + if {![interp issafe] && ![file exists $path]} { continue } set currentsearchpath [file join $path $pkgroot] - if {![file exists $currentsearchpath]} { + if {![interp issafe] && ![file exists $currentsearchpath]} { continue } set strip [llength [file split $path]] @@ -352,9 +352,13 @@ proc ::tcl::tm::roots {paths} { foreach pa $paths { set p [file join $pa tcl$major] for {set n $minor} {$n >= 0} {incr n -1} { - path add [file normalize [file join $p ${major}.${n}]] + set px [file join $p ${major}.${n}] + if {![interp issafe]} { set px [file normalize $px] } + path add $px } - path add [file normalize [file join $p site-tcl]] + set px [file join $p site-tcl] + if {![interp issafe]} { set px [file normalize $px] } + path add $px } return } @@ -362,4 +366,4 @@ proc ::tcl::tm::roots {paths} { # Initialization. Set up the default paths, then insert the new # handler into the chain. -::tcl::tm::Defaults +if {![interp issafe]} { ::tcl::tm::Defaults } |