diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-28 18:52:36 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-28 18:52:36 +0100 |
commit | a8c39008921156163832087cf12b2d0684f4ba6f (patch) | |
tree | 023abd65b38423aad59fbeae31bc779071245970 /src/plugins/lua/fann_scores.lua | |
parent | 46a9c398ef7aa011d532bfc159c85efa289bdd1e (diff) | |
download | rspamd-a8c39008921156163832087cf12b2d0684f4ba6f.tar.gz rspamd-a8c39008921156163832087cf12b2d0684f4ba6f.zip |
[Fix] Fix fann rewrite
Diffstat (limited to 'src/plugins/lua/fann_scores.lua')
-rw-r--r-- | src/plugins/lua/fann_scores.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/lua/fann_scores.lua b/src/plugins/lua/fann_scores.lua index e72c1d4d6..2a124f019 100644 --- a/src/plugins/lua/fann_scores.lua +++ b/src/plugins/lua/fann_scores.lua @@ -186,7 +186,8 @@ local function fann_train_callback(score, required_score,results, cf, id, opts) -- Store fann on disk local res = false - if not rspamd_util.stat(fname) then + local err,st = rspamd_util.stat(fname) + if not 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) |