Changeset

5858:866a49f5aa61

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
author Kim Alvefur <zash@zash.se>
date Sun, 11 Feb 2024 12:50:53 +0100
parents 5857:58df53eefa28
children 5859:9f41d2d33e3e
files mod_firewall/mod_firewall.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);