unaccounted whiteout files should not be fatal
This commit is contained in:
parent
3a1339ff8f
commit
b44c980457
@ -1,6 +1,7 @@
|
||||
package filetree
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/sirupsen/logrus"
|
||||
"sort"
|
||||
)
|
||||
@ -64,9 +65,8 @@ func Efficiency(trees []*FileTree) (float64, EfficiencySlice) {
|
||||
stackedTree := StackRange(trees, 0, currentTree-1)
|
||||
previousTreeNode, err := stackedTree.GetNode(node.Path())
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
if previousTreeNode.Data.FileInfo.TarHeader.FileInfo().IsDir() {
|
||||
logrus.Debug(fmt.Sprintf("CurrentTree: %d : %s", currentTree, err))
|
||||
} else if previousTreeNode.Data.FileInfo.TarHeader.FileInfo().IsDir() {
|
||||
previousTreeNode.VisitDepthChildFirst(sizer, nil)
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ func InitializeData(imageID string) ([]*Layer, []*filetree.FileTree, float64, fi
|
||||
imageTarPath, tmpDir := saveImage(imageID)
|
||||
// fmt.Println(imageTarPath)
|
||||
// fmt.Println(tmpDir)
|
||||
// imageTarPath := "/home/wagoodman/Downloads/image/image.tar"
|
||||
// imageTarPath := "/tmp/dive280665036/image.tar"
|
||||
defer os.RemoveAll(tmpDir)
|
||||
|
||||
// read through the image contents and build a tree
|
||||
|
Loading…
x
Reference in New Issue
Block a user