From 5b862e6a3c79b8e336a0ac2f0d23ca69993b326d Mon Sep 17 00:00:00 2001 From: "E. Westbrook" Date: Tue, 21 Aug 2018 10:43:04 -0600 Subject: url.lua:absolute_path(): ensure a separator between base_path and relative_path --- src/url.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/url.lua b/src/url.lua index e1fa2bc..243ee1c 100644 --- a/src/url.lua +++ b/src/url.lua @@ -110,6 +110,7 @@ local function absolute_path(base_path, relative_path) if string.sub(relative_path, 1, 1) == "/" then return remove_dot_components(relative_path) end base_path = base_path:gsub("[^/]*$", "") + if not base_path:find'/$' then base_path = base_path .. '/' end local path = base_path .. relative_path path = remove_dot_components(path) return path -- cgit v1.2.3-55-g6feb