summaryrefslogtreecommitdiffstats
path: root/library/package.tcl
diff options
context:
space:
mode:
authorsurles <surles@noemail.net>1999-04-20 02:08:38 (GMT)
committersurles <surles@noemail.net>1999-04-20 02:08:38 (GMT)
commite411bf8fbdc6015a6df166561f3270313b3d0c54 (patch)
tree8d1e4252a86db773e40d98e16e23c69b6f1bce98 /library/package.tcl
parentf7a7f6b736414e416b0c7e3a4d5e3e55c92eb2d3 (diff)
downloadtcl-e411bf8fbdc6015a6df166561f3270313b3d0c54.zip
tcl-e411bf8fbdc6015a6df166561f3270313b3d0c54.tar.gz
tcl-e411bf8fbdc6015a6df166561f3270313b3d0c54.tar.bz2
fixed bug 1497 for 8.1: tclPkgUnknown should test for read privs
FossilOrigin-Name: 332efad49d6651d132253e10c239cc3cd5d34923
Diffstat (limited to 'library/package.tcl')
-rw-r--r--library/package.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/package.tcl b/library/package.tcl
index cf8d1ba..6cbaf67 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.2 1999/04/16 00:46:56 stanton Exp $
+# RCS: @(#) $Id: package.tcl,v 1.3 1999/04/20 02:08:38 surles Exp $
#
# Copyright (c) 1991-1993 The Regents of the University of California.
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
@@ -443,11 +443,11 @@ proc tclPkgUnknown {name version {exact {}}} {
foreach file [glob -nocomplain [file join [lindex $auto_path $i] \
* pkgIndex.tcl]] {
set dir [file dirname $file]
- if {[catch {source $file} msg]} {
+ if {[file readable $file] && [catch {source $file} msg]} {
tclLog "error reading package index file $file: $msg"
}
}
- }
+ }
set dir [lindex $auto_path $i]
set file [file join $dir pkgIndex.tcl]
# safe interps usually don't have "file readable", nor stderr channel