Skip to content

Commit

Permalink
fix: strip / from dirs. Fixes #60
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 21, 2022
1 parent 86eaa11 commit 540847b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/lazy/core/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ function M.norm(path)
end
path = home .. path:sub(2)
end
return path:gsub("\\", "/")
path = path:gsub("\\", "/")
return path:sub(-1) == "/" and path:sub(1, -2) or path
end

function M.try(fn, msg)
Expand Down

0 comments on commit 540847b

Please sign in to comment.