From 09da13ab7dee143d519e1b4c51d207e8d934a0c1 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Mon, 15 Jan 2018 23:06:59 +0100 Subject: Error out on invalid mimetypes --- nov.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nov.el') diff --git a/nov.el b/nov.el index 292c9fc..efb0189 100644 --- a/nov.el +++ b/nov.el @@ -212,8 +212,9 @@ If PARSE-XML-P is t, return the contents as parsed by libxml." (defun nov-epub-valid-p (directory) "Return t if DIRECTORY makes up a valid EPUB document." - (and (nov-mimetype-valid-p directory) - (nov-container-valid-p directory))) + (when (not (nov-mimetype-valid-p directory)) + (message "Invalid mimetype")) + (nov-container-valid-p directory)) (defun nov-content-version (content) "Return the EPUB version for CONTENT." -- cgit v1.2.3