From fd29ea64acc864f13cc94e6aab9be1a1af0db4b9 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 0f7c79ce7..1c8e97afb 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; } @@ -396,6 +394,7 @@ rspamd_init_lua_filters (struct rspamd_config *cfg) struct rspamd_statfile_config *st; lua_State *L = cfg->lua_state; + rspamd_lua_set_path (L, cfg); cur = g_list_first (cfg->script_modules); while (cur) { -- 2.39.5