summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugins/lua/fann_scores.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/fann_scores.lua b/src/plugins/lua/fann_scores.lua
index 2a124f019..1e6f90985 100644
--- a/src/plugins/lua/fann_scores.lua
+++ b/src/plugins/lua/fann_scores.lua
@@ -187,7 +187,7 @@ local function fann_train_callback(score, required_score,results, cf, id, opts)
local res = false
local err,st = rspamd_util.stat(fname)
- if not err then
+ if err then
local fd,err = rspamd_util.create_file(fname)
if not fd then
rspamd_logger.errx(cf, 'cannot save fann in %s: %s', fname, err)