fix undefined variable
This commit is contained in:
parent
69cea72f90
commit
dad6d3d218
|
@ -690,15 +690,13 @@ function core.load_plugins()
|
||||||
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
|
||||||
core.log_quiet("Version mismatch for plugin %q from %s", basename, plugin_dir)
|
core.log_quiet("Version mismatch for plugin %q from %s", basename, plugin_dir)
|
||||||
local ls = refused_list[root_dir == USERDIR and 'userdir' or 'datadir'].plugins
|
local list = refused_list[plugin_dir:find(USERDIR) == 1 and 'userdir' or 'datadir'].plugins
|
||||||
ls[#ls + 1] = filename
|
table.insert(list, filename)
|
||||||
end
|
end
|
||||||
if version_match and config[basename] ~= false then
|
if version_match and core[basename] ~= false then
|
||||||
local modname = "plugins." .. basename
|
no_errors = core.try(require, "plugins." .. basename)
|
||||||
local ok = core.try(require, modname)
|
if no_errors then
|
||||||
if ok then core.log_quiet("Loaded plugin %q from %s", basename, plugin_dir) end
|
core.log_quiet("Loaded plugin %q from %s", basename, plugin_dir)
|
||||||
if not ok then
|
|
||||||
no_errors = false
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue