fix: use filepath instead of path for file source exclusions (#2411)

Signed-off-by: Wayne Starr <me@racer159.com>
This commit is contained in:
Wayne Starr 2023-12-13 15:45:34 -07:00 committed by GitHub
parent 67dbd1fe4c
commit 8bca0ac39e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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