From 09e7a565838161c7bb0289e82596ba2bfb687801 Mon Sep 17 00:00:00 2001 From: Osmany Montero Date: Wed, 26 Feb 2025 10:17:04 +0200 Subject: [PATCH] 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. --- correlation/rules/update.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/correlation/rules/update.go b/correlation/rules/update.go index b0e56a93d..4e3c42a4f 100644 --- a/correlation/rules/update.go +++ b/correlation/rules/update.go @@ -18,7 +18,7 @@ func Update(updateReady chan bool) { f, err := os.Stat(cnf.RulesFolder + "system") if err != nil { - if errors.Is(err, os.ErrNotExist) { + if !errors.Is(err, os.ErrNotExist) { log.Printf("Could not get rules folder: %v", err) os.Exit(1) }