Skip to content

Commit

Permalink
ubuntu: 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 a40a1c7 commit 951d95f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions ubuntu/distributionscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (

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

const (
Expand Down Expand Up @@ -52,12 +51,7 @@ func (ds *DistributionScanner) Scan(ctx context.Context, l *claircore.Layer) ([]
"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("ubuntu: unable to open layer: %w", err)
}
defer rd.Close()
sys, err := tarfs.New(rd)
sys, err := l.FS()
if err != nil {
return nil, fmt.Errorf("ubuntu: unable to open layer: %w", err)
}
Expand Down

0 comments on commit 951d95f

Please sign in to comment.