summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-08-26 13:49:07 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-08-26 13:49:07 (GMT)
commit6eb9e4367cece63b5ba975098c2d3ad41915a0fa (patch)
treeaddbbc852f865ab3ddf4b0a12da664cc69c458b1
parenteafb0a9f0995dbf657c3c8ece8da5579bd6cb72b (diff)
parenta6063330c474dde9b388bfeda1b1bb746aebf23a (diff)
downloadtcl-6eb9e4367cece63b5ba975098c2d3ad41915a0fa.zip
tcl-6eb9e4367cece63b5ba975098c2d3ad41915a0fa.tar.gz
tcl-6eb9e4367cece63b5ba975098c2d3ad41915a0fa.tar.bz2
Merge dup-removal into search loop so we avoid pre-processing efforts on data that are never used. Contributed patch from Brian Griffin.
-rw-r--r--library/auto.tcl11
1 files changed, 3 insertions, 8 deletions
diff --git a/library/auto.tcl b/library/auto.tcl
index 02edcc4..97ea8af 100644
--- a/library/auto.tcl
+++ b/library/auto.tcl
@@ -122,11 +122,9 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
# uniquify $dirs in order
array set seen {}
foreach i $dirs {
- # Take note that the [file normalize] below has been noted to cause
- # difficulties for the freewrap utility. See Bug 1072136. Until
- # freewrap resolves the matter, one might work around the problem by
- # disabling that branch.
+ # Make sure $i is unique under normalization. Avoid repeated [source].
if {[interp issafe]} {
+ # Safe interps have no [file normalize].
set norm $i
} else {
set norm [file normalize $i]
@@ -135,10 +133,7 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
continue
}
set seen($norm) {}
- lappend uniqdirs $i
- }
- set dirs $uniqdirs
- foreach i $dirs {
+
set the_library $i
set file [file join $i $initScript]