Check-in [5f4e904dfd]
Overview
Comment:Additional handling of determing child count
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tcl-ops
Files: files | file ages | folders
SHA1:5f4e904dfd440eb073873e37b85e21289302f1de
User & Date: rkeene on 2014-11-10 05:43:14
Other Links: manifest | tags
Context
2014-11-10
05:57
Moved to tcl-ops branch check-in: 0effed3239 user: rkeene tags: trunk
05:43
Additional handling of determing child count Closed-Leaf check-in: 5f4e904dfd user: rkeene tags: tcl-ops
05:38
Updated to compute number of children for each type of node so that things like "find" work reliably check-in: 9e96bce564 user: rkeene tags: tcl-ops
Changes

Modified appfsd.tcl from [01f5038438] to [85c7175a51].

   619    619   						set retval(is_remotefile) 1
   620    620   
   621    621   						set work [split $pathinfo(file) "/"]
   622    622   						set directory [join [lrange $work 0 end-1] "/"]
   623    623   						set file [lindex $work end]
   624    624   
   625    625   						if {$directory == "" && $file == ""} {
   626         -							array set retval [list type directory childcount [llength [getchildren $path]]]
          626  +							array set retval [list type directory]
   627    627   						}
   628    628   
   629    629   						::appfs::db eval {SELECT type, time, source, size, perms FROM files WHERE package_sha1 = $pathinfo(package_sha1) AND file_directory = $directory AND file_name = $file;} retval {}
          630  +
          631  +						if {$retval(type) == "directory"} {
          632  +							set retval(childcount) [llength [getchildren $path]]
          633  +						}
          634  +
   630    635   						unset -nocomplain retval(*)
   631    636   					}
   632    637   				}
   633    638   
   634    639   			}
   635    640   		}
   636    641