diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-29 12:00:51 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-29 12:00:51 +0100 |
commit | b8354b5a5790da9afc1a7c5025584cbcde9baef8 (patch) | |
tree | c337f0aaa16ddd0857581a6a2693059f3b37be21 /src/rspamadm/commands.c | |
parent | cb40e98e64bc5a590a59c5772d5e192b9527429d (diff) | |
download | rspamd-b8354b5a5790da9afc1a7c5025584cbcde9baef8.tar.gz rspamd-b8354b5a5790da9afc1a7c5025584cbcde9baef8.zip |
[Minor] Fix minor issues
Diffstat (limited to 'src/rspamadm/commands.c')
-rw-r--r-- | src/rspamadm/commands.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rspamadm/commands.c b/src/rspamadm/commands.c index 2ad8b81a1..744212afb 100644 --- a/src/rspamadm/commands.c +++ b/src/rspamadm/commands.c @@ -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; |