Skip to content

Commit

Permalink
osrelease: 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 24, 2023
1 parent 477e090 commit bbb6077
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions osrelease/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/quay/claircore"
"github.com/quay/claircore/indexer"
"github.com/quay/claircore/pkg/cpe"
"github.com/quay/claircore/pkg/tarfs"
)

const (
Expand Down Expand Up @@ -65,12 +64,7 @@ func (s *Scanner) Scan(ctx context.Context, l *claircore.Layer) ([]*claircore.Di
zlog.Debug(ctx).Msg("start")
defer zlog.Debug(ctx).Msg("done")

r, err := l.Reader()
if err != nil {
return nil, fmt.Errorf("osrelease: unable to open layer: %w", err)
}
defer r.Close()
sys, err := tarfs.New(r)
sys, err := l.FS()
if err != nil {
return nil, fmt.Errorf("osrelease: unable to open layer: %w", err)
}
Expand Down

0 comments on commit bbb6077

Please sign in to comment.