diff --git a/data/core/common.lua b/data/core/common.lua index b47cdbbb..016ba8c4 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -236,6 +236,9 @@ end local function split_on_slash(s, sep_pattern) local t = {} + if s:match("^[/\\]") then + t[#t + 1] = "" + end for fragment in string.gmatch(s, "([^/\\]+)") do t[#t + 1] = fragment end