From 61ee7c58cc00840f2959f46fdf6f1bf860870f41 Mon Sep 17 00:00:00 2001 From: Zachary Rice Date: Wed, 27 Apr 2022 21:48:56 -0500 Subject: [PATCH] fix no-git bug (#859) --- detect/detect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/detect/detect.go b/detect/detect.go index 3d2e60a1..73964d34 100644 --- a/detect/detect.go +++ b/detect/detect.go @@ -335,7 +335,7 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) { if err != nil { return err } - if fInfo.Name() == ".git" { + if fInfo.Name() == ".git" && fInfo.IsDir() { return filepath.SkipDir } if fInfo.Mode().IsRegular() {