util/startup.lua
changeset 8667 d49acc9a8da2
parent 8656 dab9b8af0f01
child 8668 4b260a3f8b94
--- a/util/startup.lua	Thu Mar 22 21:18:58 2018 +0000
+++ b/util/startup.lua	Thu Mar 22 21:45:38 2018 +0000
@@ -179,13 +179,6 @@
 	end
 end
 
-function startup.chdir()
-	if prosody.installed then
-		-- Change working directory to data path.
-		require "lfs".chdir(data_path);
-	end
-end
-
 function startup.init_global_state()
 	-- luacheck: ignore 121
 	prosody.bare_sessions = {};
@@ -216,6 +209,13 @@
 	_G.prosody = prosody;
 end
 
+function startup.chdir()
+	if prosody.installed then
+		-- Change working directory to data path.
+		require "lfs".chdir(prosody.paths.data);
+	end
+end
+
 function startup.add_global_prosody_functions()
 	-- Function to reload the config file
 	function prosody.reload_config()