Changeset

8664:d49acc9a8da2

util.startup: Fix chdir() to use correct path variable
author Matthew Wild <mwild1@gmail.com>
date Thu, 22 Mar 2018 21:45:38 +0000
parents 8663:a7a9d9511dc1
children 8665:4b260a3f8b94
files util/startup.lua
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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()