summaryrefslogtreecommitdiffstats
path: root/library/safe.tcl
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-08-18 13:31:54 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-08-18 13:31:54 (GMT)
commit8288b47f5e7647e90d8499bf5e45099b1651aa62 (patch)
tree50e5ad30d6d5ff4e1659b8a1c8a8690add83414f /library/safe.tcl
parent34d0a97402b92ffaea87cbe40088ac100e9c6361 (diff)
downloadtcl-8288b47f5e7647e90d8499bf5e45099b1651aa62.zip
tcl-8288b47f5e7647e90d8499bf5e45099b1651aa62.tar.gz
tcl-8288b47f5e7647e90d8499bf5e45099b1651aa62.tar.bz2
* library/safe.tcl (AliasGlob): [Bug 3004191]: Restore safe [glob] to
working condition.
Diffstat (limited to 'library/safe.tcl')
-rw-r--r--library/safe.tcl12
1 files changed, 5 insertions, 7 deletions
diff --git a/library/safe.tcl b/library/safe.tcl
index c5fad56..81b53b4 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution of
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: safe.tcl,v 1.38 2010/06/14 13:48:25 nijtmans Exp $
+# RCS: @(#) $Id: safe.tcl,v 1.39 2010/08/18 13:31:55 dkf Exp $
#
# The implementation is based on namespaces. These naming conventions are
@@ -775,18 +775,18 @@ proc ::safe::AliasGlob {slave args} {
return
}
try {
- ::interp invokehidden $slave glob {*}$cmd
+ set entries [::interp invokehidden $slave glob {*}$cmd]
} on error msg {
Log $slave $msg
return -code error "script error"
}
- Log $slave "GLOB @ $msg" NOTICE
+ Log $slave "GLOB @ $entries" NOTICE
# Translate path back to what the slave should see.
set res {}
set l [string length $dir]
- foreach p $msg {
+ foreach p $entries {
if {[string equal -length $l $dir $p]} {
set p [string replace $p 0 [expr {$l-1}] $virtualdir]
}
@@ -933,13 +933,11 @@ proc ::safe::AliasLoad {slave file args} {
}
try {
- ::interp invokehidden $slave load $file $package $target
+ return [::interp invokehidden $slave load $file $package $target]
} on error msg {
Log $slave $msg
return -code error $msg
}
-
- return $msg
}
# FileInAccessPath raises an error if the file is not found in the list of