+2008-12-03 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * library/tclprocvfs.tcl (vfs::ns::matchindirectory): Handle the
+ single item dir/file, and don't add a slash for single proc.
+
2008-12-02 Jeff Hobbs <jeffh@ActiveState.com>
* tests/vfs.test (vfs-2.3,2.4,4.1): add tests for mount command
set ns ::[string trim $ns :]
set nspath ${ns}::${path}
+ set slash 1
if {[::vfs::matchDirectories $type]} {
# add matching directories to $res
if {[string length $pattern]} {
eval [linsert [namespace children $nspath $pattern] 0 lappend res]
- } else {
- if {[namespace exists $nspath]} {
- eval [linsert $nspath 0 lappend res]
- }
+ } elseif {[namespace exists $nspath]} {
+ lappend res $nspath
}
}
# add matching files to $res
if {[string length $pattern]} {
eval [linsert [info procs ${nspath}::$pattern] 0 lappend res]
- } else {
- eval [linsert [info procs $ns] 0 lappend res]
+ } elseif {[llength [info procs $nspath]]} {
+ lappend res $nspath
+ set slash 0
}
}
# There is a disconnect between 8.4 and 8.5 with the / handling
# Make sure actualpath gets just one trailing /
- if {![string match */ $actualpath]} { append actualpath / }
+ if {$slash && ![string match */ $actualpath]} { append actualpath / }
set realres [list]
foreach r $res {