From 8518faa83e19f31ab9a08eeaabb770c185422a7e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 16 Feb 2015 16:50:05 +0000 Subject: [PATCH] Do not set lua path when cfg is not loaded. --- src/lua/lua_common.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index 78a80f1ea..cb5f07712 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -351,8 +351,6 @@ rspamd_lua_init (struct rspamd_config *cfg) rspamd_lua_add_preload (L, "ucl", luaopen_ucl); - rspamd_lua_set_path (L, cfg); - return L; } @@ -395,6 +393,7 @@ rspamd_init_lua_filters (struct rspamd_config *cfg) struct script_module *module; lua_State *L = cfg->lua_state; + rspamd_lua_set_path (L, cfg); cur = g_list_first (cfg->script_modules); while (cur) { -- 2.39.5