cmd/stindex: Add dumping folder meta

This commit is contained in:
Jakob Borg
2020-09-04 11:39:21 +02:00
parent b7986801cd
commit 71bfad0bc6
4 changed files with 91 additions and 57 deletions
+7 -1
View File
@@ -91,7 +91,13 @@ func dump(ldb backend.Backend) {
case db.KeyTypeFolderMeta:
folder := binary.BigEndian.Uint32(key[1:])
fmt.Printf("[foldermeta] F:%d V:%x\n", folder, it.Value())
fmt.Printf("[foldermeta] F:%d", folder)
var cs db.CountsSet
if err := cs.Unmarshal(it.Value()); err != nil {
fmt.Printf(" (invalid)\n")
} else {
fmt.Printf(" V:%v\n", cs)
}
case db.KeyTypeMiscData:
fmt.Printf("[miscdata] K:%q V:%q\n", key[1:], it.Value())