aboutsummaryrefslogtreecommitdiff
path: root/stdlib.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib.tcl')
-rw-r--r--stdlib.tcl8
1 files changed, 4 insertions, 4 deletions
diff --git a/stdlib.tcl b/stdlib.tcl
index 84e9120..3abeb3e 100644
--- a/stdlib.tcl
+++ b/stdlib.tcl
@@ -101,11 +101,11 @@ proc errorInfo {msg {stacktrace ""}} {
# Returns the empty string if not found.
proc {info nameofexecutable} {} {
if {[info exists ::jim_argv0]} {
- if {[string first "/" $::jim_argv0] >= 0} {
- return $::jim_argv0
+ if {[string match "*/*" $::jim_argv0]} {
+ return [file join [pwd] $::jim_argv0]
}
- foreach path [split [env PATH ""] :] {
- set exec [file join $path $::jim_argv0]
+ foreach path [split [env PATH ""] $::tcl_platform(pathSeparator)] {
+ set exec [file join [pwd] $path $::jim_argv0]
if {[file executable $exec]} {
return $exec
}