mirror of
https://github.com/uhIgnacio/EmoteManager.git
synced 2024-08-15 02:23:13 +00:00
strip leading directory paths from archive members
This commit is contained in:
parent
4828a4ff52
commit
165faa631f
1 changed files with 1 additions and 1 deletions
|
@ -197,7 +197,7 @@ class Emotes(commands.Cog):
|
|||
limit = 50_000_000 # prevent someone from trying to make a giant compressed file
|
||||
async for name, img, error in utils.archive.extract_async(io.BytesIO(archive), size_limit=limit):
|
||||
if error is None:
|
||||
name = self.format_emote_filename(name)
|
||||
name = self.format_emote_filename(posixpath.basename(name))
|
||||
async with context.typing():
|
||||
await context.send(await self.add_safe_bytes(context.guild, name, context.author.id, img))
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue