Skip to content

Commit b44c980

Browse files
committed
unaccounted whiteout files should not be fatal
1 parent 3a1339f commit b44c980

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

filetree/efficiency.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package filetree
22

33
import (
4+
"fmt"
45
"github.com/sirupsen/logrus"
56
"sort"
67
)
@@ -64,9 +65,8 @@ func Efficiency(trees []*FileTree) (float64, EfficiencySlice) {
6465
stackedTree := StackRange(trees, 0, currentTree-1)
6566
previousTreeNode, err := stackedTree.GetNode(node.Path())
6667
if err != nil {
67-
logrus.Fatal(err)
68-
}
69-
if previousTreeNode.Data.FileInfo.TarHeader.FileInfo().IsDir() {
68+
logrus.Debug(fmt.Sprintf("CurrentTree: %d : %s", currentTree, err))
69+
} else if previousTreeNode.Data.FileInfo.TarHeader.FileInfo().IsDir() {
7070
previousTreeNode.VisitDepthChildFirst(sizer, nil)
7171
}
7272

image/image.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func InitializeData(imageID string) ([]*Layer, []*filetree.FileTree, float64, fi
215215
imageTarPath, tmpDir := saveImage(imageID)
216216
// fmt.Println(imageTarPath)
217217
// fmt.Println(tmpDir)
218-
// imageTarPath := "/home/wagoodman/Downloads/image/image.tar"
218+
// imageTarPath := "/tmp/dive280665036/image.tar"
219219
defer os.RemoveAll(tmpDir)
220220

221221
// read through the image contents and build a tree

0 commit comments

Comments
 (0)