From f1d459cac2561928d3c8d66e71446c719e066002 Mon Sep 17 00:00:00 2001 From: ericm Date: Thu, 19 Oct 2000 01:05:01 +0000 Subject: * library/tkfbox.tcl (OkCmd): Applied patch from [Bug: 6365], which adds safety for directory names containing spaces or which are non-lists. --- ChangeLog | 4 ++++ library/tkfbox.tcl | 7 +++---- 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 + * 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]} { -- cgit v0.12