summaryrefslogtreecommitdiffstats
path: root/library/tm.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-24 14:50:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-24 14:50:11 (GMT)
commit63855497af431a6ee84d67b62ade8694485d76c9 (patch)
tree8239e1a67cec1bb976b23a1d96024097fc93b8a1 /library/tm.tcl
parentfe94c1d6c4fa1c0d810d2eb6b845e7d0faf8812c (diff)
parent48d0827130389368a247f26b480bd819a1c753e5 (diff)
downloadtcl-63855497af431a6ee84d67b62ade8694485d76c9.zip
tcl-63855497af431a6ee84d67b62ade8694485d76c9.tar.gz
tcl-63855497af431a6ee84d67b62ade8694485d76c9.tar.bz2
Merge 8.7
Diffstat (limited to 'library/tm.tcl')
-rw-r--r--library/tm.tcl13
1 files changed, 7 insertions, 6 deletions
diff --git a/library/tm.tcl b/library/tm.tcl
index 0ed3f1a..3c0ec22 100644
--- a/library/tm.tcl
+++ b/library/tm.tcl
@@ -212,11 +212,12 @@ proc ::tcl::tm::UnknownHandler {original name args} {
}
set strip [llength [file split $path]]
- # We can't use glob in safe interps, so enclose the following in a
- # catch statement, where we get the module files out of the
- # subdirectories. In other words, Tcl Modules are not-functional
- # in such an interpreter. This is the same as for the command
- # "tclPkgUnknown", i.e. the search for regular packages.
+ # Get the module files out of the subdirectories.
+ # - 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 {
# We always look for _all_ possible modules in the current
@@ -266,7 +267,7 @@ proc ::tcl::tm::UnknownHandler {original name args} {
# of the package file is the last element in the list.
package ifneeded $pkgname $pkgversion \
- "[::list package provide $pkgname $pkgversion];[::list source -encoding utf-8 $file]"
+ "[::list package provide $pkgname $pkgversion];[::list source $file]"
# We abort in this unknown handler only if we got a
# satisfying candidate for the requested package.