fix(cache): dont return directories in lsmod

This commit is contained in:
Folke Lemaitre 2023-01-02 15:08:20 +01:00
parent 60e96b478a
commit 9893430187
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 1 additions and 1 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, modpath
return root, (modpath ~= root and modpath or nil)
end
end