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: branch diff | 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
620
621
622
623
624
625
626

627
628
629





630
631
632
633
634
635
636
619
620
621
622
623
624
625

626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641







-
+



+
+
+
+
+







						set retval(is_remotefile) 1

						set work [split $pathinfo(file) "/"]
						set directory [join [lrange $work 0 end-1] "/"]
						set file [lindex $work end]

						if {$directory == "" && $file == ""} {
							array set retval [list type directory childcount [llength [getchildren $path]]]
							array set retval [list type directory]
						}

						::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 {}

						if {$retval(type) == "directory"} {
							set retval(childcount) [llength [getchildren $path]]
						}

						unset -nocomplain retval(*)
					}
				}

			}
		}