aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/startup.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/util/startup.lua b/util/startup.lua
index 1bac7399..627c7015 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -179,13 +179,6 @@ function startup.detect_installed()
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 @@ function startup.init_global_state()
_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()