summaryrefslogtreecommitdiffstats
path: root/library/tkfbox.tcl
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2015-05-26 12:44:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2015-05-26 12:44:35 (GMT)
commita2f1e1a431e3224256bbf26f863fd5547a1ebe1d (patch)
tree76af378310ab2c3911876ebb6cd43c621b703736 /library/tkfbox.tcl
parent20ece3ffdaf1e1db267594e9601960065b268244 (diff)
parentc6310d2a325a8284e036acb3a4aa269414a22e09 (diff)
downloadtk-a2f1e1a431e3224256bbf26f863fd5547a1ebe1d.zip
tk-a2f1e1a431e3224256bbf26f863fd5547a1ebe1d.tar.gz
tk-a2f1e1a431e3224256bbf26f863fd5547a1ebe1d.tar.bz2
Fix [1641721]: tk_getOpenFile shows symlinks to directories twice.
Diffstat (limited to 'library/tkfbox.tcl')
-rw-r--r--library/tkfbox.tcl5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 6604575..a52465a 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -1169,6 +1169,10 @@ proc ::tk::dialog::file::GlobFiltered {dir type {overrideFilter 0}} {
if {$f eq "." || $f eq ".."} {
continue
}
+ # See ticket [1641721], $f might be a link pointing to a dir
+ if {$type != "d" && [file isdir [file join $dir $f]]} {
+ continue
+ }
lappend result $f
}
}
@@ -1176,7 +1180,6 @@ proc ::tk::dialog::file::GlobFiltered {dir type {overrideFilter 0}} {
}
proc ::tk::dialog::file::CompleteEnt {w} {
- variable showHiddenVar
upvar ::tk::dialog::file::[winfo name $w] data
set f [$data(ent) get]
if {$data(-multiple)} {