mod_firewall: Fix to find scripts when installed with plugin installer
Extra resources are stored in a different path by luarocks, not
alongside the code as this code assumed.
Thanks eTaurus
--- a/mod_firewall/mod_firewall.lua Wed Feb 07 11:57:30 2024 +0000
+++ b/mod_firewall/mod_firewall.lua Sun Feb 11 12:50:53 2024 +0100
@@ -612,7 +612,7 @@
local function resolve_script_path(script_path)
local relative_to = prosody.paths.config;
if script_path:match("^module:") then
- relative_to = module.path:sub(1, -#("/mod_"..module.name..".lua"));
+ relative_to = module:get_directory();
script_path = script_path:match("^module:(.+)$");
end
return resolve_relative_path(relative_to, script_path);