diff options
author | Kim Alvefur <zash@zash.se> | 2021-05-05 15:54:05 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2021-05-05 15:54:05 +0200 |
commit | 2d707a905f1e1cb342014c4616e7e4fa6abe9fa3 (patch) | |
tree | 98d26dfb97068e0f287937d494461aecf466706c /core | |
parent | c372b193592263115440128dd8ef7066458fa81f (diff) | |
download | prosody-2d707a905f1e1cb342014c4616e7e4fa6abe9fa3.tar.gz prosody-2d707a905f1e1cb342014c4616e7e4fa6abe9fa3.zip |
core.certmanager: Join paths with OS-aware util.paths function
Right thing to do, rather than hardcoding '/'
Diffstat (limited to 'core')
-rw-r--r-- | core/certmanager.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua index 5d873e9c..1b1bf709 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -37,7 +37,8 @@ local now = os.time; local next = next; local prosody = prosody; -local resolve_path = require"util.paths".resolve_relative_path; +local pathutil = require"util.paths"; +local resolve_path = pathutil.resolve_relative_path; local config_path = prosody.paths.config or "."; local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)"); @@ -103,7 +104,7 @@ local function index_certs(dir, files_by_name, depth_limit) if depth_limit <= 0 then return files_by_name; end for file in lfs.dir(dir) do - local full = dir.."/"..file + local full = pathutil.join(dir, file); if lfs.attributes(full, "mode") == "directory" then if file:sub(1,1) ~= "." then index_certs(full, files_by_name, depth_limit-1); |