changeset 6418:98e06fc5680f

mod_muc_cache_media: relative link is better
author Stephen Paul Weber <singpolyma@singpolyma.net>
date Tue, 24 Feb 2026 13:20:45 -0500
parents dcc8d4af8d4f
children 233691533318
files mod_muc_cache_media/mod_muc_cache_media.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_cache_media/mod_muc_cache_media.lua	Tue Feb 24 11:57:09 2026 -0500
+++ b/mod_muc_cache_media/mod_muc_cache_media.lua	Tue Feb 24 13:20:45 2026 -0500
@@ -152,7 +152,7 @@
 				end
 				local sha2_path = storage_path.."/sha-256/"..sha2:gsub("+","-"):gsub("/","_"):gsub("=","")
 				if not lfs.attributes(sha2_path) then
-					lfs.link(final_path, sha2_path, true)
+					lfs.link("../"..final_name, sha2_path, true)
 				end
 				url_map[original_url] = { local_url = public_base_url..final_name.."?ct="..content_type, path=final_path, sha2=sha2, sha3=sha3, size=size, name=name, content_type=content_type }
 			else