mirror of https://github.com/folke/lazy.nvim.git
fix(cache): normalize paths
This commit is contained in:
parent
bb1c2f4c3e
commit
62c1542141
|
@ -99,6 +99,7 @@ end
|
||||||
---@param modpath string
|
---@param modpath string
|
||||||
---@return any, string?
|
---@return any, string?
|
||||||
function M.loadfile(modpath)
|
function M.loadfile(modpath)
|
||||||
|
modpath = modpath:gsub("\\", "/")
|
||||||
return M.load(modpath, modpath)
|
return M.load(modpath, modpath)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -106,6 +107,7 @@ end
|
||||||
---@param modpath string
|
---@param modpath string
|
||||||
---@return function?, string? error_message
|
---@return function?, string? error_message
|
||||||
function M.load(modkey, modpath)
|
function M.load(modkey, modpath)
|
||||||
|
modpath = modpath:gsub("\\", "/")
|
||||||
local hash = M.hash(modpath)
|
local hash = M.hash(modpath)
|
||||||
if not hash then
|
if not hash then
|
||||||
-- trigger correct error
|
-- trigger correct error
|
||||||
|
@ -167,6 +169,7 @@ function M.get_rtp()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for _, path in ipairs(vim.api.nvim_list_runtime_paths()) do
|
for _, path in ipairs(vim.api.nvim_list_runtime_paths()) do
|
||||||
|
path = path:gsub("\\", "/")
|
||||||
if not skip[path] then
|
if not skip[path] then
|
||||||
M.rtp[#M.rtp + 1] = path
|
M.rtp[#M.rtp + 1] = path
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue