# HG changeset patch # User Kim Alvefur # Date 1779643042 -7200 # Node ID 8a4e6421fd2427b3bac04762371cef7052df1fee # Parent 3b605bfc94aa57da37b799a4702fe240cecae5f8 mod_storage_xmlarchive: Remove unnecessary percent-encoding of paths Paths from lfs.dir() are already in the percent-encoded form. Probably confusion left over since before 1b081c8fc1d9 diff -r 3b605bfc94aa -r 8a4e6421fd24 mod_storage_xmlarchive/mod_storage_xmlarchive.lua --- a/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Sun May 24 19:15:11 2026 +0200 +++ b/mod_storage_xmlarchive/mod_storage_xmlarchive.lua Sun May 24 19:17:22 2026 +0200 @@ -457,13 +457,13 @@ function provider:purge(username) local encoded_username = dm.path_encode((username or "@") .. "@"); local basepath = prosody.paths.data .. "/" .. dm.path_encode(module.host); - for rawstore in lfs.dir(basepath) do - local encoded_store = basepath .. "/" .. dm.path_encode(rawstore); - if lfs.attributes(encoded_store, "mode") == "directory" then - for file in lfs.dir(encoded_store) do + for store in lfs.dir(basepath) do + local store_path = basepath .. "/" .. store; + if lfs.attributes(store_path, "mode") == "directory" then + for file in lfs.dir(store_path) do if file:sub(1, #encoded_username) == encoded_username then if file:sub(-4) == ".xml" or file:sub(-5) == ".list" or file:sub(-5) == ".lidx" then - os.remove(encoded_store .. "/" .. file); + os.remove(store_path .. "/" .. file); end end end