fix no-git bug (#859)

This commit is contained in:
Zachary Rice authored and GitHub committed 2022-04-27 21:48:56 -05:00
1 parent ad7509e3b4
commit 8f7bb6e762
1 file changed
+1 -1
+1 -1
View File
@@ -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() {