From 8bca0ac39e25052c3d9bb7c05dd38f175fea9d90 Mon Sep 17 00:00:00 2001 From: Wayne Starr Date: Wed, 13 Dec 2023 15:45:34 -0700 Subject: [PATCH] fix: use filepath instead of path for file source exclusions (#2411) Signed-off-by: Wayne Starr --- syft/source/file_source.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syft/source/file_source.go b/syft/source/file_source.go index fcccd592914..c3a89668c86 100644 --- a/syft/source/file_source.go +++ b/syft/source/file_source.go @@ -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