Skip to content

Commit

Permalink
Set extra_plugin_paths to data_dir/plugins (#6849)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperon committed Nov 6, 2020
1 parent 91708e2 commit dee72a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion datastorage.lua
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions frontend/pluginloader.lua
Expand Up @@ -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
Expand Down

0 comments on commit dee72a4

Please sign in to comment.