fix: better compatibility for malformed epub files

Refs: #1441
This commit is contained in:
Gauthier Roebroeck 2024-03-12 11:41:53 +08:00
parent f8e40ce968
commit e09cbc49eb

View file

@ -43,7 +43,7 @@ class EpubExtractor(
fun isEpub(path: Path): Boolean =
try {
getEntryStream(path, "mimetype").decodeToString() == "application/epub+zip"
getEntryStream(path, "mimetype").decodeToString().trim() == "application/epub+zip"
} catch (e: Exception) {
false
}