fix(extras): accept symlinks in User extras directory

This commit is contained in:
Iordanis Petkakis 2024-03-16 01:36:38 +02:00
parent 864c58cae6
commit 30107e3eb3

View file

@ -42,7 +42,7 @@ function M.get()
local root = Util.find_root(source.module)
if root then
Util.walk(root, function(path, name, type)
if type == "file" and name:match("%.lua$") then
if (type == "file" or type == "link") and name:match("%.lua$") then
name = path:sub(#root + 2, -5):gsub("/", ".")
local ok, extra = pcall(M.get_extra, source, source.module .. "." .. name)
if ok then