Set extra_plugin_paths to data_dir/plugins (#6849)

reviewable/pr6813/r24
jperon 4 years ago committed by GitHub
parent 91708e25d0
commit dee72a431c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -54,7 +54,7 @@ local function initDataDir()
local sub_data_dirs = {
"cache", "clipboard",
"data", "data/dict", "data/tessdata",
"history", "ota",
"history", "plugins",
"screenshots", "settings", "styletweaks",
}
for _, dir in ipairs(sub_data_dirs) do

@ -49,6 +49,11 @@ function PluginLoader:loadPlugins()
else
logger.err("extra_plugin_paths config only accepts string or table value")
end
else
local data_dir = require("datastorage"):getDataDir()
if data_dir ~= "." then
G_reader_settings:saveSetting("extra_plugin_paths", { data_dir .. "/plugins/" })
end
end
-- keep reference to old value so they can be restored later

Loading…
Cancel
Save