mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
fix(util): fixed double slashes
This commit is contained in:
parent
62c1542141
commit
af87108605
1 changed files with 5 additions and 1 deletions
|
@ -29,7 +29,11 @@ end
|
|||
|
||||
function M.norm(path)
|
||||
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
|
||||
return path:gsub("\\", "/")
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue