TclVFS

Check-in [85d3b01734]
Login
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:[Bug 2482573] improve handling of glob for tclprocvfs
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 85d3b01734ac9b76821db674c2c09b53be4f67c3
User & Date: patthoyts 2009-01-22 15:24:33
Context
2009-01-22
16:03
Fix the vfs::crc function and test to conform to its actual use in the zipvfs code. check-in: b5732950ca user: patthoyts tags: trunk
15:24
[Bug 2482573] improve handling of glob for tclprocvfs check-in: 85d3b01734 user: patthoyts tags: trunk
15:15
Fix for [Bug 1533748] (./ prefixed file names) and tests for [Bug 1011492] (zip files with preface data) check-in: 0a72685718 user: patthoyts tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to library/tclprocvfs.tcl.

111
112
113
114
115
116
117

118
119
120
121
122
123
124
125
proc vfs::ns::matchindirectory {ns path actualpath pattern type} {
    ::vfs::log "matchindirectory $path $actualpath $pattern $type"
    set res [list]

    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]
	} elseif {[namespace exists $nspath]} {
	    lappend res $nspath
	}






>
|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
proc vfs::ns::matchindirectory {ns path actualpath pattern type} {
    ::vfs::log "matchindirectory $path $actualpath $pattern $type"
    set res [list]

    set ns ::[string trim $ns :]
    set nspath ${ns}::${path}
    if {![namespace exists $nspath]} {return {}}
     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]
	} elseif {[namespace exists $nspath]} {
	    lappend res $nspath
	}