summaryrefslogtreecommitdiffstats
path: root/library
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)
commit663c034daa8c001fc5d5be0edf2ff132841e3c8f (patch)
tree76af378310ab2c3911876ebb6cd43c621b703736 /library
parent32058aca4beb9db6cdde22c184e509193a756267 (diff)
parenta05d1fea7d8d233f5b557a5645d5a996cc33a0b2 (diff)
downloadtk-663c034daa8c001fc5d5be0edf2ff132841e3c8f.zip
tk-663c034daa8c001fc5d5be0edf2ff132841e3c8f.tar.gz
tk-663c034daa8c001fc5d5be0edf2ff132841e3c8f.tar.bz2
Fix [1641721]: tk_getOpenFile shows symlinks to directories twice.
Diffstat (limited to 'library')
-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)} {