diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-03-25 12:30:15 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-03-25 12:30:15 +0000 |
commit | c3646183acf81ebf630cba1615d7ebf6105ee388 (patch) | |
tree | d604ae4555e78414e73cc89b17e66cfdfd3dea9c /lualib/lua_util.lua | |
parent | 3496dd364745a2b747ae775b6a3804d4524054e5 (diff) | |
download | rspamd-c3646183acf81ebf630cba1615d7ebf6105ee388.tar.gz rspamd-c3646183acf81ebf630cba1615d7ebf6105ee388.zip |
[Minor] Load redis scripts from the prefix to simplify calls
Diffstat (limited to 'lualib/lua_util.lua')
-rw-r--r-- | lualib/lua_util.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lualib/lua_util.lua b/lualib/lua_util.lua index e745099a7..c2bdf40a9 100644 --- a/lualib/lua_util.lua +++ b/lualib/lua_util.lua @@ -1574,6 +1574,13 @@ local function join_path(...) end exports.join_path = join_path +-- Short unit test for sanity +if path_sep == '/' then + assert(join_path('/path', 'to', 'file') == '/path/to/file') +else + assert(join_path('C:', 'path', 'to', 'file') == 'C:\\path\\to\\file') +end + -- Defines symbols priorities for common usage in prefilters/postfilters exports.symbols_priorities = { top = 10, -- Symbols must be executed first (or last), such as settings |