Skip to content

Commit

Permalink
fix: use filepath instead of path for file source exclusions (#2411)
Browse files Browse the repository at this point in the history
Signed-off-by: Wayne Starr <[email protected]>
  • Loading branch information
Racer159 authored Dec 13, 2023
1 parent 67dbd1f commit 8bca0ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion syft/source/file_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ func (s FileSource) FileResolver(_ Scope) (file.Resolver, error) {
return fs.SkipDir
}

if path.Base(p) != path.Base(s.config.Path) {
if filepath.Base(p) != filepath.Base(s.config.Path) {
// we're in the root directory, but this is not the file we want to scan...
// we should selectively skip this file (not the directory we're in).
return fileresolver.ErrSkipPath
Expand Down

0 comments on commit 8bca0ac

Please sign in to comment.