PluginLoader should update lookup_path_list if data_dir is not ".". (#7447)

Should update lookup_path_list instead of extra_paths

It looks like a problem introduced by dee72a431c (diff-b3b0e0e90ea7b43a9d97a1c7572acef3f1dc7d1d2f75fe634345a1b841c624fa).
This commit is contained in:
Hzj_jie
2021-03-30 01:02:06 -07:00
committed by GitHub
parent 1f15184bbb
commit ffc7ccb576

View File

@@ -66,7 +66,9 @@ function PluginLoader:loadPlugins()
else
local data_dir = require("datastorage"):getDataDir()
if data_dir ~= "." then
G_reader_settings:saveSetting("extra_plugin_paths", { data_dir .. "/plugins/" })
local extra_path = data_dir .. "/plugins/"
G_reader_settings:saveSetting("extra_plugin_paths", { extra_path })
table.insert(lookup_path_list, extra_path)
end
end