Changeset

4095:6ad7ed619d37

prosodyctl: Instead of calling datamanager.set_path(), just ensure prosody.paths.data always contains the correct value (including config)
author Matthew Wild <mwild1@gmail.com>
date Fri, 07 Jan 2011 11:56:52 +0000
parents 4094:38f3dfe88d4f
children 4096:3b991ceb228e
files prosodyctl
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Fri Jan 07 11:56:15 2011 +0000
+++ b/prosodyctl	Fri Jan 07 11:56:52 2011 +0000
@@ -109,13 +109,14 @@
 local original_logging_config = config.get("*", "core", "log");
 config.set("*", "core", "log", { { levels = { min="info" }, to = "console" } });
 
+local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
+prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR, 
+	          plugins = CFG_PLUGINDIR, data = data_path };
+
 require "core.loggingmanager"
 
 dependencies.log_warnings();
 
-local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
-require "util.datamanager".set_data_path(data_path);
-
 -- Switch away from root and into the prosody user --
 local switched_user, current_uid;