check version in init.lua within directory plugins

This commit is contained in:
lqdev 2021-04-25 19:14:36 +02:00
parent 34e94bb8aa
commit c859498d68
1 changed files with 3 additions and 1 deletions

View File

@ -601,7 +601,9 @@ end
local function check_plugin_version(filename)
local info = system.get_file_info(filename)
if info ~= nil and info.type == "dir" then
return true
filename = filename .. "/init.lua"
info = system.get_file_info(filename)
if not info then return true end
end
local f = io.open(filename, "r")
if not f then return false end