changeset 6508:3044e14fcaa0

mod_storage_xmlarchive: Fix compatibility with Lua 5.5 Loop variables became immutable in Lua 5.5, so shadow it by reassigning to it.
author Link Mauve <linkmauve@linkmauve.fr>
date Tue, 07 Apr 2026 06:51:05 +0200
parents 73915ac32649
children f61564e11d3b
files mod_storage_xmlarchive/mod_storage_xmlarchive.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Mon Apr 06 15:22:36 2026 +0200
+++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua	Tue Apr 07 06:51:05 2026 +0200
@@ -458,7 +458,7 @@
 	local encoded_username = dm.path_encode((username or "@") .. "@");
 	local basepath = prosody.paths.data .. "/" .. dm.path_encode(module.host);
 	for store in lfs.dir(basepath) do
-		store = basepath .. "/" .. dm.path_encode(store);
+		local store = basepath .. "/" .. dm.path_encode(store);
 		if lfs.attributes(store, "mode") == "directory" then
 			for file in lfs.dir(store) do
 				if file:sub(1, #encoded_username) == encoded_username then