fix: relative path (#2023)
This commit is contained in:
@@ -13,9 +13,8 @@ M.confirm_popup = nil
|
||||
---@param rel_path string
|
||||
---@return string
|
||||
function M.get_abs_path(rel_path)
|
||||
if Path:new(rel_path):is_absolute() then return rel_path end
|
||||
local project_root = Utils.get_project_root()
|
||||
local p = tostring(Path:new(project_root):joinpath(rel_path):absolute())
|
||||
local p = Utils.join_paths(project_root, rel_path)
|
||||
if p:sub(-2) == "/." then p = p:sub(1, -3) end
|
||||
return p
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user