Explorar o código

fix no-git bug (#859)

Zachary Rice %!s(int64=4) %!d(string=hai) anos
pai
achega
61ee7c58cc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      detect/detect.go

+ 1 - 1
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() {