[core] Fix --ignore-no-formats-error (#10345)

Fixes regression in 5ce582448e

Closes #10344
Authored by: Grub4K

Co-authored-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
bashonly 2024-07-03 11:46:01 -05:00 committed by GitHub
parent d28aa87e21
commit cc767e9490
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5120,6 +5120,9 @@ def __init__(self, extension, /):
@classmethod
def sanitize_extension(cls, extension, /, *, prepend=False):
if extension is None:
return None
if '/' in extension or '\\' in extension:
raise cls(extension)