Skip to content

Commit a4bd4dc

Browse files
committed
fix(loader): normalize rtp paths on windows #230
1 parent 68ee0cb commit a4bd4dc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lua/lazy/core/loader.lua

+5
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,12 @@ function M.add_to_rtp(plugin)
282282
local rtp = vim.api.nvim_get_runtime_file("", true)
283283
local idx_dir, idx_after
284284

285+
local is_win = jit.os:find("Windows")
286+
285287
for i, path in ipairs(rtp) do
288+
if is_win then
289+
path = Util.norm(path)
290+
end
286291
if path == Config.me then
287292
idx_dir = i + 1
288293
elseif not idx_after and path:sub(-6, -1) == "/after" then

0 commit comments

Comments
 (0)