Skip to content

Commit

Permalink
whiteout: use Layer.FS method
Browse files Browse the repository at this point in the history
Signed-off-by: Hank Donnay <hdonnay@redhat.com>
  • Loading branch information
hdonnay committed Oct 23, 2023
1 parent 951d95f commit a8ac5ed
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions whiteout/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (

"github.com/quay/claircore"
"github.com/quay/claircore/indexer"
"github.com/quay/claircore/pkg/tarfs"
)

const (
Expand Down Expand Up @@ -39,12 +38,7 @@ func (s *Scanner) Scan(ctx context.Context, l *claircore.Layer) ([]claircore.Fil
"layer", l.Hash.String())
zlog.Debug(ctx).Msg("start")
defer zlog.Debug(ctx).Msg("done")
rd, err := l.Reader()
if err != nil {
return nil, fmt.Errorf("whiteout: unable to read layer: %w", err)
}
defer rd.Close()
sys, err := tarfs.New(rd)
sys, err := l.FS()
if err != nil {
return nil, fmt.Errorf("whiteout: unable to create fs: %w", err)
}
Expand Down

0 comments on commit a8ac5ed

Please sign in to comment.