fix(loader): always load init.lua in plugin mods

This commit is contained in:
Folke Lemaitre 2023-01-02 15:04:32 +01:00
parent 9e90852a47
commit 60e96b478a
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 5 additions and 3 deletions

View file

@ -271,7 +271,7 @@ function M.find_dir(modname)
local modpath = M.find(modname, { patterns = { "" } })
if modpath then
local root = modpath:gsub("/init%.lua$", ""):gsub("%.lua$", "")
return root, (root ~= modpath and modpath or nil)
return root, modpath
end
end