summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
Diffstat (limited to 'library')
-rw-r--r--library/tkfbox.tcl7
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"
}