Skip to content

Commit

Permalink
fix: Add a check to prevent attempting to load a directory within pat…
Browse files Browse the repository at this point in the history
…terns
  • Loading branch information
LaurenceJJones committed Nov 12, 2024
1 parent fd314a3 commit 28db47d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/parser/unix_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func Init(c map[string]interface{}) (*UnixParserCtx, error) {
}
r.DataFolder = c["data"].(string)
for _, f := range files {
if strings.Contains(f.Name(), ".") {
if strings.Contains(f.Name(), ".") || f.IsDir() {
continue
}
if err := r.Grok.AddFromFile(filepath.Join(c["patterns"].(string), f.Name())); err != nil {
Expand Down

0 comments on commit 28db47d

Please sign in to comment.