From: Niki Roo Date: Sat, 15 Jul 2017 07:32:26 +0000 (+0200) Subject: Small fixes: update check, epub: X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=dea6331397544cde6cc3d2f58dd6355c57679cea;p=fanfix-jexer.git Small fixes: update check, epub: - update check will now be more clear when it cannot contact github.com - epub support will now fail with "epub not supported" instead of NPE --- diff --git a/src/be/nikiroo/fanfix/VersionCheck.java b/src/be/nikiroo/fanfix/VersionCheck.java index be7fb91..7f8d1a0 100644 --- a/src/be/nikiroo/fanfix/VersionCheck.java +++ b/src/be/nikiroo/fanfix/VersionCheck.java @@ -141,7 +141,8 @@ public class VersionCheck { reader.close(); } } catch (IOException e) { - Instance.syserr(e); + Instance.syserr(new IOException( + "Cannot download latest changelist on github.com", e)); } } diff --git a/src/be/nikiroo/fanfix/supported/Epub.java b/src/be/nikiroo/fanfix/supported/Epub.java index 0bd09bd..bd5c719 100644 --- a/src/be/nikiroo/fanfix/supported/Epub.java +++ b/src/be/nikiroo/fanfix/supported/Epub.java @@ -97,7 +97,7 @@ class Epub extends InfoText { if (!entry.isDirectory() && entry.getName().startsWith(getDataPrefix())) { String entryLName = entry.getName().toLowerCase(); - + boolean imageEntry = false; for (String ext : getImageExt(false)) { if (entryLName.endsWith(ext)) { @@ -166,7 +166,10 @@ class Epub extends InfoText { tmp = null; - fakeIn.close(); + if (fakeIn != null) { + fakeIn.close(); + } + super.close(); }