Software /
code /
prosody
Changeset
4167:9c60cc8dc142
prosody, prosodyctl: Use plugin_paths in addition to, not instead of, the default plugin path
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 24 Feb 2011 01:35:33 +0000 |
parents | 4166:3ac90743039b |
children | 4200:fb487ee690ea |
files | prosody prosodyctl |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/prosody Wed Feb 23 18:31:48 2011 +0000 +++ b/prosody Thu Feb 24 01:35:33 2011 +0000 @@ -186,10 +186,12 @@ local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data"; local custom_plugin_paths = config.get("*", "core", "plugin_paths"); if custom_plugin_paths then - CFG_PLUGINDIR = table.concat(custom_plugin_paths, package.config:sub(3,3)); -- path1;path2;path3 + local path_sep = package.config:sub(3,3); + -- path1;path2;path3;defaultpath... + CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); end prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, - plugins = CFG_PLUGINDIR, data = data_path }; + plugins = CFG_PLUGINDIR or "plugins", data = data_path }; prosody.arg = _G.arg;
--- a/prosodyctl Wed Feb 23 18:31:48 2011 +0000 +++ b/prosodyctl Thu Feb 24 01:35:33 2011 +0000 @@ -112,10 +112,12 @@ local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data"; local custom_plugin_paths = config.get("*", "core", "plugin_paths"); if custom_plugin_paths then - CFG_PLUGINDIR = table.concat(custom_plugin_paths, package.config:sub(3,3)); -- path1;path2;path3 + local path_sep = package.config:sub(3,3); + -- path1;path2;path3;defaultpath... + CFG_PLUGINDIR = table.concat(custom_plugin_paths, path_sep)..path_sep..(CFG_PLUGINDIR or "plugins"); end prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, - plugins = CFG_PLUGINDIR, data = data_path }; + plugins = CFG_PLUGINDIR or "plugins", data = data_path }; require "core.loggingmanager"