Index: appfsd.tcl ================================================================== --- appfsd.tcl +++ appfsd.tcl @@ -249,28 +249,31 @@ set work [split $line ","] unset -nocomplain fileInfo set fileInfo(type) [lindex $work 0] set fileInfo(time) [lindex $work 1] - set fileInfo(name) [lindex $work end] - set fileInfo(name) [split [string trim $fileInfo(name) "/"] "/"] - set fileInfo(directory) [join [lrange $fileInfo(name) 0 end-1] "/"] - set fileInfo(name) [lindex $fileInfo(name) end] - - set work [lrange $work 2 end-1] + set work [lrange $work 2 end] switch -- $fileInfo(type) { "file" { set fileInfo(size) [lindex $work 0] set fileInfo(perms) [lindex $work 1] set fileInfo(sha1) [lindex $work 2] + + set work [lrange 3 end] } "symlink" { set fileInfo(source) [lindex $work 0] + set work [lrange 1 end] } } + set fileInfo(name) [join $work ","] + set fileInfo(name) [split [string trim $fileInfo(name) "/"] "/"] + set fileInfo(directory) [join [lrange $fileInfo(name) 0 end-1] "/"] + set fileInfo(name) [lindex $fileInfo(name) end] + _db eval {INSERT INTO files (package_sha1, type, time, source, size, perms, file_sha1, file_name, file_directory) VALUES ($package_sha1, $fileInfo(type), $fileInfo(time), $fileInfo(source), $fileInfo(size), $fileInfo(perms), $fileInfo(sha1), $fileInfo(name), $fileInfo(directory) );} _db eval {UPDATE packages SET haveManifest = 1 WHERE sha1 = $package_sha1;} } return COMPLETE