mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 21:24:21 +01:00
fix no-git bug (#859)
This commit is contained in:
1 parent
ad7509e3b4
commit
61ee7c58cc
1 file changed
+1
-1
+1
-1
@@ -335,7 +335,7 @@ func (d *Detector) DetectFiles(source string) ([]report.Finding, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if fInfo.Name() == ".git" {
|
if fInfo.Name() == ".git" && fInfo.IsDir() {
|
||||||
return filepath.SkipDir
|
return filepath.SkipDir
|
||||||
}
|
}
|
||||||
if fInfo.Mode().IsRegular() {
|
if fInfo.Mode().IsRegular() {
|
||||||
|
|||||||
Reference in new issue
Block a user