Fix plugin version check

This commit is contained in:
Francesco Abbate 2021-08-25 23:45:18 +02:00
parent b76917ef9e
commit dc501cb41a
1 changed files with 13 additions and 11 deletions

View File

@ -687,7 +687,8 @@ function core.load_plugins()
for filename, plugin_dir in pairs(files) do
local basename = filename:match("(.-)%.lua$") or filename
local version_match = check_plugin_version(plugin_dir .. '/' .. filename)
local is_lua_file, version_match = check_plugin_version(plugin_dir .. '/' .. filename)
if is_lua_file then
if not version_match then
core.log_quiet("Version mismatch for plugin %q from %s", basename, plugin_dir)
local list = refused_list[plugin_dir:find(USERDIR) == 1 and 'userdir' or 'datadir'].plugins
@ -701,6 +702,7 @@ function core.load_plugins()
end
end
end
end
return no_errors, refused_list
end