prosody: Instead of calling datamanager.set_path(), just ensure prosody.paths.data always contains the correct value (including config)
authorMatthew Wild <mwild1@gmail.com>
Fri, 07 Jan 2011 11:56:15 +0000
changeset 4094 38f3dfe88d4f
parent 4093 36555949bd16
child 4095 6ad7ed619d37
prosody: Instead of calling datamanager.set_path(), just ensure prosody.paths.data always contains the correct value (including config)
prosody
--- a/prosody	Fri Jan 07 11:55:19 2011 +0000
+++ b/prosody	Fri Jan 07 11:56:15 2011 +0000
@@ -183,9 +183,10 @@
 	prosody.full_sessions = full_sessions;
 	prosody.hosts = hosts;
 	
+	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 = CFG_DATADIR };
-	
+	                  plugins = CFG_PLUGINDIR, data = data_path };
+
 	prosody.arg = _G.arg;
 
 	prosody.platform = "unknown";
@@ -344,8 +345,6 @@
 end
 
 function init_data_store()
-	local data_path = config.get("*", "core", "data_path") or CFG_DATADIR or "data";
-	require "util.datamanager".set_data_path(data_path);
 	require "core.storagemanager";
 end