Skip to content

Commit

Permalink
Fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
adammcclenaghan committed Oct 18, 2024
1 parent b0efc97 commit a1b48d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions syft/internal/fileresolver/unindexed_directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

stereoscopeFile "github.com/anchore/stereoscope/pkg/file"
"github.com/anchore/syft/internal/log"
"github.com/anchore/syft/syft/file"
syftFile "github.com/anchore/syft/syft/file"
)

Expand Down Expand Up @@ -214,7 +213,7 @@ func (u UnindexedDirectory) filesByGlob(resolveLinks bool, includeDirs bool, pat
// This requires walking the filetree from u.base and checking the MIME type of each file we encounter
// Handling of errors while walking is ignored unless a filterFn wants the directory to be skipped.
func (u UnindexedDirectory) FilesByMIMEType(types ...string) ([]syftFile.Location, error) {
uniqueLocations := make([]file.Location, 0)
uniqueLocations := make([]syftFile.Location, 0)
// TODO: For now we use afero.Walk here to walk the entire dir tree, but we know that when a single directory
// contains many files this will cause us to run OOM due to how Golang provides lexical ordering guarantees by reading the entire dir into memory..
// That can be fixed by using a custom walk func that uses Readdir(N) where N >=1 so that the entire directory isn't read into
Expand Down

0 comments on commit a1b48d1

Please sign in to comment.