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