summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--library/tkfbox.tcl7
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 8bb2ac8..407cb93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2000-10-18 Eric Melski <ericm@ajubasolutions.com>
+ * library/tkfbox.tcl (OkCmd): Applied patch from [Bug: 6365],
+ which adds safety for directory names containing spaces or which
+ are non-lists.
+
* win/tkWinDialog.c (GetFileNameW, GetFileNameA,
Tk_ChooseColorObjCmd, Tk_ChooseDirectoryObjCmd): Added error
checking for the return value from the common dialog functions, so
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index ab802f8..b8b3322 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.23 2000/08/29 20:17:12 ericm Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.24 2000/10/19 01:05:01 ericm Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -1626,7 +1626,7 @@ proc ::tk::dialog::file::OkCmd {w} {
set text [lindex $text 0]
set file [::tk::dialog::file::JoinFile $data(selectPath) $text]
if {[file isdirectory $file]} {
- ::tk::dialog::file::ListInvoke $w $text
+ ::tk::dialog::file::ListInvoke $w [list $text]
return
}
}
@@ -1699,8 +1699,7 @@ proc ::tk::dialog::file::ListInvoke {w text} {
return
}
- set file [::tk::dialog::file::JoinFile $data(selectPath) \
- [lindex $text 0]]
+ set file [::tk::dialog::file::JoinFile $data(selectPath) [lindex $text 0]]
set class [winfo class $w]
if {[string equal $class TkChooseDir] || [file isdirectory $file]} {