diff options
author | kjnash <k.j.nash@usa.net> | 2020-07-18 13:22:31 (GMT) |
---|---|---|
committer | kjnash <k.j.nash@usa.net> | 2020-07-18 13:22:31 (GMT) |
commit | 6310c709d39e30dcefc165aa242973e919d86134 (patch) | |
tree | 35ceb3975e94160fa8a29fedf0af6fd9068893a1 /library/package.tcl | |
parent | 690f2c283978a046e78664a1070c5c0bf5ddf67f (diff) | |
download | tcl-6310c709d39e30dcefc165aa242973e919d86134.zip tcl-6310c709d39e30dcefc165aa242973e919d86134.tar.gz tcl-6310c709d39e30dcefc165aa242973e919d86134.tar.bz2 |
Update comments about safe interpreters in library/tm.tcl and library/package.tcl so they agree with code
Diffstat (limited to 'library/package.tcl')
-rw-r--r-- | library/package.tcl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/library/package.tcl b/library/package.tcl index 44e3b28..d6280ae 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -479,9 +479,12 @@ proc tclPkgUnknown {name args} { } set tclSeenPath($dir) 1 - # we can't use glob in safe interps, so enclose the following in a - # catch statement, where we get the pkgIndex files out of the - # subdirectories + # Get the pkgIndex.tcl files in subdirectories of auto_path directories. + # - Safe Base interpreters have a restricted "glob" command that + # works in this case. + # - The "catch" was essential when there was no safe glob and every + # call in a safe interp failed; it is retained only for corner + # cases in which the eventual call to glob returns an error. catch { foreach file [glob -directory $dir -join -nocomplain \ * pkgIndex.tcl] { @@ -585,6 +588,7 @@ proc tcl::MacOSXPkgUnknown {original name args} { set tclSeenPath($dir) 1 # get the pkgIndex files out of the subdirectories + # Safe interpreters do not use tcl::MacOSXPkgUnknown - see init.tcl. foreach file [glob -directory $dir -join -nocomplain \ * Resources Scripts pkgIndex.tcl] { set dir [file dirname $file] |