diff options
author | 2022-11-16 17:40:27 -0500 | |
---|---|---|
committer | 2022-11-16 17:40:27 -0500 | |
commit | 3664dfe7e1cc3a9ba70192caa8e0d7dc09b604f1 (patch) | |
tree | 6ae1ba44b1d95f5063f447fb0060bde296f6ed17 | |
parent | Add max file limit enforcing (diff) |
Sort attachments by name
-rw-r--r-- | snekbox/nsjail.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/snekbox/nsjail.py b/snekbox/nsjail.py index 30e6ecd..128172d 100644 --- a/snekbox/nsjail.py +++ b/snekbox/nsjail.py @@ -212,7 +212,8 @@ class NsJail: # Parse attachments try: - attachments = list(temp_dir.attachments()) + # Sort attachments by name lexically + attachments = sorted(temp_dir.attachments(), key=lambda a: a.name) log.info(f"Found {len(attachments)} attachments.") except AttachmentError as err: log.error(f"Failed to parse attachments: {err}") |