diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-03-28 11:41:32 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-03-28 11:41:32 +0100 |
commit | a52c531dc50e00640070d61cf016b9ff031bed5d (patch) | |
tree | 8f516ac1771f3dd62dc057e4b4b66a29fef235be /core/configmanager.lua | |
parent | 4272c931ae0c2009e568f6e1ae16754d6158d4ef (diff) | |
download | prosody-a52c531dc50e00640070d61cf016b9ff031bed5d.tar.gz prosody-a52c531dc50e00640070d61cf016b9ff031bed5d.zip |
configmanager: Add method to report loaded config files (part of #1729 fix)
Diffstat (limited to 'core/configmanager.lua')
-rw-r--r-- | core/configmanager.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/configmanager.lua b/core/configmanager.lua index a379ecea..4cd7c9d6 100644 --- a/core/configmanager.lua +++ b/core/configmanager.lua @@ -31,6 +31,7 @@ local parser = nil; local config_mt = { __index = function (t, _) return rawget(t, "*"); end}; local config = setmetatable({ ["*"] = { } }, config_mt); +local files = {}; -- When host not found, use global local host_mt = { __index = function(_, k) return config["*"][k] end } @@ -98,6 +99,10 @@ function _M.load(filename, config_format) end end +function _M.files() + return files; +end + -- Built-in Lua parser do local pcall = _G.pcall; @@ -253,6 +258,8 @@ do return nil, err; end + t_insert(files, config_file); + return true, warnings; end |