]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Inverse logic for saving ANN
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 29 Apr 2016 13:55:38 +0000 (14:55 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 29 Apr 2016 13:55:38 +0000 (14:55 +0100)
src/plugins/lua/fann_scores.lua

index 2a124f019ddf13193248a1ba00beac4dbac38889..1e6f90985583d99981105a6ea70fb6a8d91a8f91 100644 (file)
@@ -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)