diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-03-22 21:45:38 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-03-22 21:45:38 +0000 |
commit | 496b5277c35288b5c8672ca5839706a693df3156 (patch) | |
tree | 8f6b9b9ea444dda84ce8de99bc03d21af22e4985 /util | |
parent | e263a34414fcf15907d7dc5004e3caddf2b4bb3d (diff) | |
download | prosody-496b5277c35288b5c8672ca5839706a693df3156.tar.gz prosody-496b5277c35288b5c8672ca5839706a693df3156.zip |
util.startup: Fix chdir() to use correct path variable
Diffstat (limited to 'util')
-rw-r--r-- | util/startup.lua | 14 |
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() |