]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix minor issues
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 May 2018 11:00:51 +0000 (12:00 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 29 May 2018 11:00:51 +0000 (12:00 +0100)
lualib/plugins_stats.lua
lualib/rspamadm/fuzzy_stat.lua
src/rspamadm/commands.c

index 5c9797a9ef1a903c181c587ca8e3cc9a0fd07426..9bbebb1c8d4447af781129f92ed48b02326d0782 100644 (file)
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 ]]--
 
-local ansicolors = require "rspamadm/ansicolors"
+local ansicolors = require "ansicolors"
 
 local function printf(fmt, ...)
   print(string.format(fmt, ...))
index 05c2622bf4450c5d35f4dbd314a599b85c662dfe..20945bd4a7c5ff4b1301e53ceaaeb7dac0802e2f 100644 (file)
@@ -143,7 +143,7 @@ local function print_result(r)
   return print_num(r)
 end
 
-local getopt = require "rspamadm/getopt"
+local getopt = require "getopt"
 
 return function(args, res)
   local res_ips = {}
index 2ad8b81a13befc9f3e9c6b62a41fb4724ccd0d7b..744212afbb07d70747dafc168edcdeeb09132a35 100644 (file)
@@ -190,13 +190,17 @@ rspamadm_fill_lua_commands (lua_State *L, GPtrArray *dest)
        GError *err = NULL;
        const gchar *lualibdir = RSPAMD_LUALIBDIR, *path;
        struct rspamadm_command *lua_cmd;
+       gchar search_dir[PATH_MAX];
 
        if (g_hash_table_lookup (ucl_vars, "LUALIBDIR")) {
                lualibdir = g_hash_table_lookup (ucl_vars, "LUALIBDIR");
        }
 
-       if ((lua_paths = rspamd_glob_path (lualibdir, "*.lua", FALSE, &err)) == NULL) {
-               msg_err ("cannot glob files in %s/*.lua: %e", lualibdir, err);
+       rspamd_snprintf (search_dir, sizeof (search_dir), "%s%crspamadm%c",
+                       lualibdir, G_DIR_SEPARATOR, G_DIR_SEPARATOR);
+
+       if ((lua_paths = rspamd_glob_path (search_dir, "*.lua", FALSE, &err)) == NULL) {
+               msg_err ("cannot glob files in %s/*.lua: %e", search_dir, err);
                g_error_free (err);
 
                return;