fixed versioning, again
This commit is contained in:
parent
064fc35c77
commit
34e94bb8aa
|
@ -599,6 +599,10 @@ end
|
|||
|
||||
|
||||
local function check_plugin_version(filename)
|
||||
local info = system.get_file_info(filename)
|
||||
if info ~= nil and info.type == "dir" then
|
||||
return true
|
||||
end
|
||||
local f = io.open(filename, "r")
|
||||
if not f then return false end
|
||||
local version_match = false
|
||||
|
@ -625,8 +629,6 @@ function core.load_plugins()
|
|||
local plugin_dir = root_dir .. "/plugins"
|
||||
local files = system.list_dir(plugin_dir)
|
||||
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 version_match = check_plugin_version(plugin_dir .. '/' .. filename)
|
||||
if not version_match then
|
||||
|
@ -644,7 +646,6 @@ function core.load_plugins()
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return no_errors, refused_list
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue