diff --git a/data/core/common.lua b/data/core/common.lua index d8f8a5aa..06ef2880 100644 --- a/data/core/common.lua +++ b/data/core/common.lua @@ -238,6 +238,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