Skip to content

Fix issue #222#223

Open
SilverTorus wants to merge 1 commit into
MangaManagerORG:developfrom
SilverTorus:develop
Open

Fix issue #222#223
SilverTorus wants to merge 1 commit into
MangaManagerORG:developfrom
SilverTorus:develop

Conversation

@SilverTorus
Copy link
Copy Markdown

Resolves issue: #222

Changes Made
Fix a bug where ComicInfo.xml could not be found when not at the archive root. Changed the list comprehension to return the first occurrence of a filepath within the archive that ends with "ComicInfo.xml".

Original Technical Issue
ComicInfo.xml could not be found when not at the archive root. This occurred because the index 0 of the list comprehension in the class LoadedFileMetadata would always return false and the fallback path within the archive (ComicInfo.xml) would be chosen instead.

This occurred because the list comprehension was returning a list of boolean values generated by comparing filename.endswith("ComicInfo.xml"). Since index 0 of an archive.namelist() will always return a folder or file at the root (and not a ComicInfo.xml since it's not at the root) , the value will always be false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant