diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | library/package.tcl | 9 | ||||
-rw-r--r-- | library/safe.tcl | 4 |
3 files changed, 11 insertions, 6 deletions
@@ -1,5 +1,9 @@ 2000-11-24 Donal K. Fellows <fellowsd@cs.man.ac.uk> + * library/package.tcl (tclPkgUnknown,tclMacPkgSearch): + * library/safe.tcl (AddSubDirs): [glob] uses -directory instead of + unsafe [file join] to fix Bug #123313 + * generic/tclIndexObj.c: * generic/tclTestObj.c (TestindexobjCmd): Changed internal representation of index objects to fix Bug #119082; fix shouldn't diff --git a/library/package.tcl b/library/package.tcl index 09886f0..d04dac8 100644 --- a/library/package.tcl +++ b/library/package.tcl @@ -3,7 +3,7 @@ # utility procs formerly in init.tcl which can be loaded on demand # for package management. # -# RCS: @(#) $Id: package.tcl,v 1.15 2000/07/19 21:40:57 ericm Exp $ +# RCS: @(#) $Id: package.tcl,v 1.16 2000/11/24 13:56:40 dkf Exp $ # # Copyright (c) 1991-1993 The Regents of the University of California. # Copyright (c) 1994-1998 Sun Microsystems, Inc. @@ -437,7 +437,7 @@ proc tclPkgSetup {dir pkg version files} { # interpreter to setup the package database. proc tclMacPkgSearch {dir} { - foreach x [glob -nocomplain [file join $dir *.shlb]] { + foreach x [glob -directory $dir -nocomplain *.shlb] { if {[file isfile $x]} { set res [resource open $x] foreach y [resource list TEXT $res] { @@ -477,7 +477,8 @@ proc tclPkgUnknown {name version {exact {}}} { # in a catch statement, where we get the pkgIndex files out # of the subdirectories catch { - foreach file [glob -nocomplain [file join $dir * pkgIndex.tcl]] { + foreach file [glob -directory $dir -join -nocomplain \ + * pkgIndex.tcl] { set dir [file dirname $file] if {[file readable $file] && ![info exists procdDirs($dir)]} { if {[catch {source $file} msg]} { @@ -509,7 +510,7 @@ proc tclPkgUnknown {name version {exact {}}} { tclMacPkgSearch $dir set procdDirs($dir) 1 } - foreach x [glob -nocomplain [file join $dir *]] { + foreach x [glob -directory $dir -nocomplain *] { if {[file isdirectory $x] && ![info exists procdDirs($x)]} { set dir $x tclMacPkgSearch $dir diff --git a/library/safe.tcl b/library/safe.tcl index a929653..6d4c41b 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.6 1999/08/19 02:59:40 hobbs Exp $ +# RCS: @(#) $Id: safe.tcl,v 1.7 2000/11/24 13:56:40 dkf Exp $ # # The implementation is based on namespaces. These naming conventions @@ -496,7 +496,7 @@ proc ::safe::interpAddToAccessPath {slave path} { if {[lsearch -exact $res $dir]<0} { lappend res $dir } - foreach sub [glob -nocomplain -- [file join $dir *]] { + foreach sub [glob -directory $dir -nocomplain *] { if {([file isdirectory $sub]) \ && ([lsearch -exact $res $sub]<0) } { # new sub dir, add it ! |