aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2020-09-11 15:52:44 +0200
committerVasilij Schneidermann <mail@vasilij.de>2020-09-11 15:52:44 +0200
commit23e5d9c4c63e3a7dc08110a8dfcbb97a1186a37f (patch)
treeb1fbe6f4af81a19d8c49ec65ecb4ee448893fceb
parent68f5b349a6ef4b8daa0140c52e317566a4d38c91 (diff)
Disable unzip prompts, log errors and show them
-rw-r--r--nov.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/nov.el b/nov.el
index 1b28a81..c8573d4 100644
--- a/nov.el
+++ b/nov.el
@@ -183,8 +183,8 @@ Each element of the stack is a list (NODEINDEX BUFFERPOS).")
(defun nov-unzip-epub (directory filename)
"Extract FILENAME into DIRECTORY.
Unnecessary nesting is removed with `nov-unnest-directory'."
- (let ((status (call-process nov-unzip-program nil nil t
- "-d" directory filename))
+ (let ((status (call-process nov-unzip-program nil "*nov unzip*" t
+ "-od" directory filename))
child)
(while (setq child (nov-contains-nested-directory-p directory))
(nov-unnest-directory directory child))
@@ -758,9 +758,10 @@ Saving is only done if `nov-save-place-file' is set."
(when (not (integerp exit-code))
(nov-clean-up)
(error "EPUB extraction aborted by signal %s" exit-code))
- (when (not (zerop exit-code))
+ (when (> exit-code 1) ; exit code 1 is most likely a warning
(nov-clean-up)
- (error "EPUB extraction failed with exit code %d" exit-code)))
+ (error "EPUB extraction failed with exit code %d (see *nov unzip* buffer)"
+ exit-code)))
(when (not (nov-epub-valid-p nov-temp-dir))
(nov-clean-up)
(error "Invalid EPUB file"))