+2001-11-14 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tkcon.tcl: added catch around file type call
+
2001-10-14 Jeff Hobbs <jeffh@ActiveState.com>
* tkcon.tcl (Init): corrected loading of rcfile when it was in a
##
set ::tkcon::PRIV(SCRIPT) [info script]
if {!$::tkcon::PRIV(WWW) && [string compare $::tkcon::PRIV(SCRIPT) {}]} {
- while {[string match link [file type $::tkcon::PRIV(SCRIPT)]]} {
- set link [file readlink $::tkcon::PRIV(SCRIPT)]
- if {[string match relative [file pathtype $link]]} {
- set ::tkcon::PRIV(SCRIPT) [file join [file dirname $::tkcon::PRIV(SCRIPT)] $link]
- } else {
- set ::tkcon::PRIV(SCRIPT) $link
+ # we use a catch here because some wrap apps choke on 'file type'
+ # because TclpLstat wasn't wrappable until 8.4.
+ catch {
+ while {[string match link [file type $::tkcon::PRIV(SCRIPT)]]} {
+ set link [file readlink $::tkcon::PRIV(SCRIPT)]
+ if {[string match relative [file pathtype $link]]} {
+ set ::tkcon::PRIV(SCRIPT) \
+ [file join [file dirname $::tkcon::PRIV(SCRIPT)] $link]
+ } else {
+ set ::tkcon::PRIV(SCRIPT) $link
+ }
+ }
+ catch {unset link}
+ if {[string match relative [file pathtype $::tkcon::PRIV(SCRIPT)]]} {
+ set ::tkcon::PRIV(SCRIPT) [file join [pwd] $::tkcon::PRIV(SCRIPT)]
}
- }
- catch {unset link}
- if {[string match relative [file pathtype $::tkcon::PRIV(SCRIPT)]]} {
- set ::tkcon::PRIV(SCRIPT) [file join [pwd] $::tkcon::PRIV(SCRIPT)]
}
}