Check-in [cc20ec9009]
Overview
Comment:Fixed issue with glob of top dir
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cc20ec9009475147471306db91edd00edaa16f1d
User & Date: rkeene on 2010-09-26 04:50:46
Other Links: manifest | tags
Context
2010-09-26
04:50
Removed partial symlink implementation from KitDLL

Reorganized KitDLL code check-in: a9fb6a2bd7 user: rkeene tags: trunk

04:50
Fixed issue with glob of top dir check-in: cc20ec9009 user: rkeene tags: trunk
04:50
Added first draft of kitdll check-in: 029b69f827 user: rkeene tags: trunk
Changes

Modified kitdll/buildsrc/kitdll-0.0/cvfs.tcl from [0556808912] to [abcb041a6c].

    16     16   }
    17     17   
    18     18   # Implementation
    19     19   
    20     20   ## Filesystem Data
    21     21   namespace eval ::vfs::kitdll::data {}
    22     22   set ::vfs::kitdll::data(joe) "Test\n"
           23  +set ::vfs::kitdll::data(bob) "joe"
    23     24   set {::vfs::kitdll::metadata()} [list type directory ino 0 mode 0555 nlink 2 uid 0 gid 0 size 0 atime 0 mtime 0 ctime 0]
    24     25   set ::vfs::kitdll::metadata(joe) [list type file ino 1 mode 0444 nlink 1 uid 0 gid 0 size 5 atime 0 mtime 0 ctime 0]
           26  +set ::vfs::kitdll::metadata(bob) [list type link ino 4 mode 0444 nlink 1 uid 0 gid 0 size 5 atime 0 mtime 0 ctime 0]
    25     27   set ::vfs::kitdll::metadata(sub) [list type directory ino 2 mode 0555 nlink 1 uid 0 gid 0 size 0 atime 0 mtime 0 ctime 0]
    26     28   set ::vfs::kitdll::metadata(sub/sub2) [list type directory ino 3 mode 0555 nlink 1 uid 0 gid 0 size 0 atime 0 mtime 0 ctime 0]
    27     29   
    28     30   proc ::vfs::kitdll::data::getData {hashkey file {start 0} {end "end"}} {
    29     31   	if {![info exists ::vfs::kitdll::data($file)]} {
    30     32   		return -code error "Invalid operation"
    31     33   	}
................................................................................
   113    115   			set test [::vfs::kitdll::data::getMetadata $hashkey $relative]
   114    116   		}
   115    117   
   116    118   		if {![info exists test]} {
   117    119   			set children [list]
   118    120   		}
   119    121   
   120         -		set children [list $root]
          122  +		set children [list $relative]
   121    123   	} else {
   122    124   		set children [::vfs::kitdll::data::getChildren $hashkey $relative]
   123    125   	}
   124    126   
   125    127   	foreach child $children {
   126    128   		if {![string match $pattern $child]} {
   127    129   			continue
................................................................................
   133    135   		}
   134    136   
   135    137   		if {[string index $actualpath end] == "/"} {
   136    138   			set child "${actualpath}${child}"
   137    139   		} else {
   138    140   			set child "${actualpath}/${child}"
   139    141   		}
          142  +		if {[string index $child end] == ""} {
          143  +			set child [string range $child 0 end-1]
          144  +		}
   140    145   
   141    146   		if {![info exists metadata(type)]} {
   142    147   			continue
   143    148   		}
   144    149   
   145    150   		set filetype 0
   146    151   		switch -- $metadata(type) {
   147    152   			"directory" {
   148    153   				set filetype [expr {$filetype | 0x04}]
   149    154   			}
   150    155   			"file" {
   151    156   				set filetype [expr {$filetype | 0x10}]
   152    157   			}
          158  +			"link" {
          159  +				set filetype [expr {$filetype | 0x20}]
          160  +			}
   153    161   			default {
   154    162   				continue
   155    163   			}
   156    164   		}
   157    165   
   158    166   		if {($filetype & $types) != $types} {
   159    167   			continue