Software /
code /
prosody
Diff
util/startup.lua @ 10210:9fdda9fafc3c
Merge mod-installer (2019 GSoC by João Duarte)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 19 Aug 2019 12:17:17 +0100 |
parent | 10108:659ffa03f1e7 |
parent | 10203:3beb37ed7f32 |
child | 10391:986349fc0f9e |
line wrap: on
line diff
--- a/util/startup.lua Sat Aug 17 15:40:52 2019 +0200 +++ b/util/startup.lua Mon Aug 19 12:17:17 2019 +0100 @@ -227,13 +227,19 @@ function startup.setup_plugindir() local custom_plugin_paths = config.get("*", "plugin_paths"); + local installer_plugin_path = config.get("*", "installer_plugin_path") or "custom_plugins"; + local path_sep = package.config:sub(3,3); + installer_plugin_path = config.resolve_relative_path(require "lfs".currentdir(), installer_plugin_path); + require "lfs".mkdir(installer_plugin_path); + require"util.paths".complement_lua_path(installer_plugin_path); if custom_plugin_paths then - local path_sep = package.config:sub(3,3); -- path1;path2;path3;defaultpath... -- luacheck: ignore 111 CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); prosody.paths.plugins = CFG_PLUGINDIR; end + CFG_PLUGINDIR = installer_plugin_path..path_sep..(CFG_PLUGINDIR or "plugins"); + prosody.paths.plugins = CFG_PLUGINDIR; end function startup.chdir()