1 local path_sep = package.config:sub(1,1);
5 -- Helper function to resolve relative paths (needed by config)
6 function path_util.resolve_relative_path(parent_path, path)
9 parent_path = parent_path:gsub("%"..path_sep.."+$", "");
10 path = path:gsub("^%.%"..path_sep.."+", "");
13 if path_sep == "/" and path:sub(1,1) ~= "/" then
15 elseif path_sep == "\\" and (path:sub(1,1) ~= "/" and (path:sub(2,3) ~= ":\\" and path:sub(2,3) ~= ":/")) then
19 return parent_path..path_sep..path;
25 -- Helper function to convert a glob to a Lua pattern
26 function path_util.glob_to_pattern(glob)
27 return "^"..glob:gsub("[%p*?]", function (c)