mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Implement keepalive plugin (#2456)
This commit is contained in:
@@ -20,10 +20,10 @@ function PluginLoader:loadPlugins()
|
||||
package.path = path.."/?.lua;"..package.path
|
||||
package.cpath = path.."/lib/?.so;"..package.cpath
|
||||
local ok, plugin_module = pcall(dofile, mainfile)
|
||||
if not ok then
|
||||
if not ok or not plugin_module then
|
||||
DEBUG("Error when loading", mainfile, plugin_module)
|
||||
end
|
||||
if not plugin_module.disabled and ok then
|
||||
if ok and plugin_module and not plugin_module.disabled then
|
||||
package.path = package_path
|
||||
package.cpath = package_cpath
|
||||
plugin_module.path = path
|
||||
|
||||
Reference in New Issue
Block a user