B:BD[
2.303] → [
2.303:316]
B:BD[
2.316] → [
2.316:427]
b := g.Root
for i := 0; i < 2; i++ {
var next *Block
for _, e := range b.Edges {
if e.Flag&EdgeFlagsDeleted != 0 {
// There are two possible configurations for the directory structure:
// The old setup had directory entries as direct children of the root.
// The new setup has a special root inode, which is a child of an intermediate
// vertex, which is a child of the root.
//
// So we need to try both possibilities.
var possibleRoots []*Block
var directFiles []*Block
for _, e := range g.Root.Edges {
if e.Flag&EdgeFlagsDeleted != 0 {
continue
}
if e.Flag&EdgeFlagsFolder == 0 {
return nil, errors.New("non-folder edge found while looking for root directory")
}
b := e.To
if len(b.Content) > 0 {
directFiles = append(directFiles, b)
continue
}
for _, f := range b.Edges {
if f.Flag&EdgeFlagsDeleted != 0 {