From 496b5277c35288b5c8672ca5839706a693df3156 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 22 Mar 2018 21:45:38 +0000 Subject: util.startup: Fix chdir() to use correct path variable --- util/startup.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'util/startup.lua') 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() -- cgit v1.2.3