mirror of https://github.com/folke/lazy.nvim.git
fix(util): fixed double slashes
This commit is contained in:
parent
62c1542141
commit
af87108605
|
@ -29,7 +29,11 @@ end
|
||||||
|
|
||||||
function M.norm(path)
|
function M.norm(path)
|
||||||
if path:sub(1, 1) == "~" then
|
if path:sub(1, 1) == "~" then
|
||||||
path = vim.loop.os_homedir() .. "/" .. path:sub(2)
|
local home = vim.loop.os_homedir()
|
||||||
|
if home:sub(-1) == "\\" or home:sub(-1) == "/" then
|
||||||
|
home = home:sub(1, -2)
|
||||||
|
end
|
||||||
|
path = home .. path:sub(2)
|
||||||
end
|
end
|
||||||
return path:gsub("\\", "/")
|
return path:gsub("\\", "/")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue