mirror of
https://github.com/hyugogirubato/cbz.git
synced 2026-09-26 13:31:00 +00:00
Normalize suffix check to lowercase for image formats
All entries in IMAGE_FORMATS are lowercase, this incorrectly fails on extensions like "JPG"
This commit is contained in:
+1
-1
@@ -176,7 +176,7 @@ class ComicInfo(ComicModel):
|
|||||||
|
|
||||||
# Some archives may contain folders or hidden files (e.g., ".extra/" or "__MACOSX/.DS_Store")
|
# Some archives may contain folders or hidden files (e.g., ".extra/" or "__MACOSX/.DS_Store")
|
||||||
# that could corrupt the suffix detection and cause invalid image handling.
|
# that could corrupt the suffix detection and cause invalid image handling.
|
||||||
if suffix not in IMAGE_FORMAT:
|
if suffix.lower() not in IMAGE_FORMAT:
|
||||||
logging.warning(f'Skipping unsupported or invalid file: {name!r} (suffix={suffix!r})')
|
logging.warning(f'Skipping unsupported or invalid file: {name!r} (suffix={suffix!r})')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user