Comparison

mod_storage_s3/mod_storage_s3.lua @ 5751:80702e33ba71

mod_storage_s3: Fix storing archives for host itself (e.g. mod_audit) Fixes error due to path constructor trying to do string.gsub(nil) with missing username or with fields.
author Kim Alvefur <zash@zash.se>
date Wed, 22 Nov 2023 12:56:50 +0100
parent 5723:9de7a1b36efb
child 5755:e8938a3166d2
comparison
equal deleted inserted replaced
5750:372b6c4bf409 5751:80702e33ba71
204 return url.build_path({ 204 return url.build_path({
205 is_absolute = true; 205 is_absolute = true;
206 bucket; 206 bucket;
207 jid.escape(module.host); 207 jid.escape(module.host);
208 jid.escape(self.store); 208 jid.escape(self.store);
209 jid.escape(username); 209 jid.escape(username or "@");
210 jid.escape(jid.prep(with)); 210 jid.escape(with and jid.prep(with) or "@");
211 date or dt.date(when); 211 date or dt.date(when);
212 key; 212 key;
213 }) 213 })
214 end 214 end
215 215