# HG changeset patch # User Kim Alvefur # Date 1697316552 -7200 # Node ID 51d0311747fa1364d7d0ab010b2b5856802a9fc9 # Parent b17ba149b7c58cfbf34ca2a68bbac98fc5f7c6da mod_storage_s3: Handle archive query without parameters diff -r b17ba149b7c5 -r 51d0311747fa mod_storage_s3/mod_storage_s3.lua --- a/mod_storage_s3/mod_storage_s3.lua Sat Oct 14 21:44:14 2023 +0200 +++ b/mod_storage_s3/mod_storage_s3.lua Sat Oct 14 22:49:12 2023 +0200 @@ -218,6 +218,9 @@ local bucket_path = url.build_path({ is_absolute = true; bucket; is_directory = true }); local prefix = { jid.escape(module.host); jid.escape(self.store); is_directory = true }; table.insert(prefix, jid.escape(username or "@")); + if not query then + query = {}; + end if query["with"] then table.insert(prefix, sha256(jid.prep(query["with"]), true):sub(1,24)); if query["start"] and query["end"] and dt.date(query["start"]) == dt.date(query["end"]) then