Software /
code /
prosody
Changeset
11305:cd8516a77255
util.startup: Make installer_plugin_path relative to data directory
Having it relative to current working directory is problematic since
this depends on how Prosody was started and changes to the data
directory during startup (but after this point).
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 24 Jan 2021 16:12:53 +0100 |
parents | 11304:c022b582d312 |
children | 11307:f2e276bb4ef8 |
files | util/startup.lua |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/util/startup.lua Sun Jan 24 15:57:48 2021 +0100 +++ b/util/startup.lua Sun Jan 24 16:12:53 2021 +0100 @@ -267,10 +267,9 @@ end function startup.setup_plugin_install_path() - local installer_plugin_path = config.get("*", "installer_plugin_path") or (CFG_DATADIR or "data").."/custom_plugins"; + local installer_plugin_path = config.get("*", "installer_plugin_path") or "custom_plugins"; local path_sep = package.config:sub(3,3); - -- TODO Figure out what this should be relative to, because CWD could be anywhere - installer_plugin_path = config.resolve_relative_path(require "lfs".currentdir(), installer_plugin_path); + installer_plugin_path = config.resolve_relative_path(CFG_DATADIR or "data", installer_plugin_path); require"util.paths".complement_lua_path(installer_plugin_path); -- luacheck: ignore 111 CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins");