Skip to content

Commit 09e7a56

Browse files
committed
Fix logic error in rules folder existence check
The condition for checking the non-existence of the rules folder was inverted, causing incorrect error handling. Adjusted the conditional to properly detect and handle missing folders.
1 parent e82481e commit 09e7a56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

correlation/rules/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func Update(updateReady chan bool) {
1818

1919
f, err := os.Stat(cnf.RulesFolder + "system")
2020
if err != nil {
21-
if errors.Is(err, os.ErrNotExist) {
21+
if !errors.Is(err, os.ErrNotExist) {
2222
log.Printf("Could not get rules folder: %v", err)
2323
os.Exit(1)
2424
}

0 commit comments

Comments
 (0)