Skip to content

Commit 230f36c

Browse files
authored
Merge pull request #1049 from utmstack/bugfix/correlation_engine/v10
Ensure nil check before accessing file attributes
2 parents 5d33c42 + bd30ed5 commit 230f36c

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
@@ -24,7 +24,7 @@ func Update(updateReady chan bool) {
2424
}
2525
}
2626

27-
if f.IsDir() || f.Name() == "system" {
27+
if f != nil && (f.IsDir() || f.Name() == "system") {
2828
rm := exec.Command("rm", "-R", cnf.RulesFolder+"system")
2929
err = rm.Run()
3030
if err != nil {

0 commit comments

Comments
 (0)