}
if (additional_path) {
- rspamd_snprintf (path_buf, sizeof (path_buf), "%s;%s/lua/?.lua;%s/lua/?.lua;%s",
- old_path, RSPAMD_PLUGINSDIR, RSPAMD_CONFDIR, additional_path);
+ rspamd_snprintf (path_buf, sizeof (path_buf), "%s/lua/?.lua;%s/lua/?.lua;%s;%s",
+ RSPAMD_PLUGINSDIR, RSPAMD_CONFDIR, additional_path, old_path);
}
else {
- rspamd_snprintf (path_buf, sizeof (path_buf), "%s;%s/lua/?.lua;%s/lua/?.lua",
- old_path, RSPAMD_PLUGINSDIR, RSPAMD_CONFDIR);
+ rspamd_snprintf (path_buf, sizeof (path_buf), "%s/lua/?.lua;%s/lua/?.lua;%s",
+ RSPAMD_PLUGINSDIR, RSPAMD_CONFDIR, old_path);
}
lua_pop (L, 1);