mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
fix no-git bug (#859)
This commit is contained in:
1 parent
ad7509e3b4
commit
8f7bb6e762
1 file changed
+1
-1
+1
-1
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user