#1430 Prosody 0.11 does not update paths.config after it finds the config file (regression)
The xmpp.js project uses awesome prosody for integration/e2e tests. Unfortunately prosody 0.11 breaks them.
Basically we start/stop/restart prosody dynamically with custom config/data paths.
You can reproduce with
git clone --depth=1 https://github.com/xmppjs/xmpp.js.git
What is the expected output?
Nothing, prosody reads the ssl configuration relative to the config file correctly.
What do you see instead?
`...error SSL/TLS: Failed to load '/etc/prosody/localhost.key'...`
Prosody tries to read `localhost.crt` and `localhost.key` from /etc/prosody instead of relative to the config file.
What version of the product are you using? On what operating system?
Prosody 0.11.2 Arch Linux
Please provide any additional information below.
Still works on our CI because we still have Prosody 0.10 there.
Thanks for the report.
util.startup.read_config() does not appear to update prosody.paths.config, only CFG_CONFIGDIR, so prosody.paths.config stays as the original value of CFG_CONFIGDIR.
That then gets used to turn relative file names in the config into absolute ones.
This should be an easy fix, but I'm uncertain about what happens if the config path is set to '.',
since prosody changes working directory to the data dir, and then '.' would refer to that and then
relative config paths would not work anymore.