]> source.dussan.org Git - rspamd.git/commitdiff
Do not set lua path when cfg is not loaded.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 16 Feb 2015 16:50:05 +0000 (16:50 +0000)
committerAndrew Lewis <nerf@judo.za.org>
Wed, 25 Feb 2015 12:35:43 +0000 (14:35 +0200)
src/lua/lua_common.c

index 0f7c79ce7d35af75efbb41ad7d19d5c6308da72b..1c8e97afb02d6507e0bae53431a2ff99223dd92a 100644 (file)
@@ -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) {