directories should not be loaded
This commit is contained in:
parent
58422271ce
commit
5e8e2f54b5
|
@ -625,6 +625,8 @@ function core.load_plugins()
|
||||||
local plugin_dir = root_dir .. "/plugins"
|
local plugin_dir = root_dir .. "/plugins"
|
||||||
local files = system.list_dir(plugin_dir)
|
local files = system.list_dir(plugin_dir)
|
||||||
for _, filename in ipairs(files or {}) do
|
for _, filename in ipairs(files or {}) do
|
||||||
|
local info = system.get_file_info(filename)
|
||||||
|
if info ~= nil and info.type == "file" then
|
||||||
local basename = filename:match("(.-)%.lua$") or filename
|
local basename = filename:match("(.-)%.lua$") or filename
|
||||||
local version_match = check_plugin_version(plugin_dir .. '/' .. filename)
|
local version_match = check_plugin_version(plugin_dir .. '/' .. filename)
|
||||||
if not version_match then
|
if not version_match then
|
||||||
|
@ -642,6 +644,7 @@ function core.load_plugins()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return no_errors, refused_list
|
return no_errors, refused_list
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue