aboutsummaryrefslogtreecommitdiffstats
path: root/util/startup.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-03-22 21:45:38 +0000
committerMatthew Wild <mwild1@gmail.com>2018-03-22 21:45:38 +0000
commitfd412010f4efb8a3930f28d69942707d3d8c28e0 (patch)
tree8f6b9b9ea444dda84ce8de99bc03d21af22e4985 /util/startup.lua
parent3422903267b7cbee65ea8ed32df515ff528b32e8 (diff)
downloadprosody-fd412010f4efb8a3930f28d69942707d3d8c28e0.tar.gz
prosody-fd412010f4efb8a3930f28d69942707d3d8c28e0.zip
util.startup: Fix chdir() to use correct path variable
Diffstat (limited to 'util/startup.lua')
-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()