diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2004-08-11 22:22:02 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2004-08-11 22:22:02 (GMT) |
commit | f4b41fe2531555493865a5ad86ecaa22165c9619 (patch) | |
tree | 6eac86dde937184cf942e5289837cb66d6251e45 /library | |
parent | 32b3a73a9db3f78838bf0e4342d49e173d37de4b (diff) | |
download | tk-f4b41fe2531555493865a5ad86ecaa22165c9619.zip tk-f4b41fe2531555493865a5ad86ecaa22165c9619.tar.gz tk-f4b41fe2531555493865a5ad86ecaa22165c9619.tar.bz2 |
Don't add the default extension to env-var references
Diffstat (limited to 'library')
-rw-r--r-- | library/tkfbox.tcl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index de4b618..ae03387 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.45 2004/08/11 21:24:25 dkf Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.46 2004/08/11 22:22:02 dkf Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -1418,7 +1418,10 @@ proc ::tk::dialog::file::ResolveFile {context text defaultext {expandEnv 1}} { # If the file has no extension, append the default. Be careful not # to do this for directories, otherwise typing a dirname in the box # will give back "dirname.extension" instead of trying to change dir. - if {![file isdirectory $path] && [string equal [file ext $path] ""]} { + if { + ![file isdirectory $path] && ([file ext $path] eq "") && + ![string match {$*} [file tail $path]] + } then { set path "$path$defaultext" } |