org-odt: Check for zip early during export

* contrib/lisp/org-odt.el (org-odt-init-outfile): Abort export
if zip utility is not available.
This commit is contained in:
Jambunathan K 2011-07-22 16:54:40 +05:30 committed by Bastien Guerry
parent 651e38ddc6
commit 3e2057732a
1 changed files with 4 additions and 0 deletions

View File

@ -1226,6 +1226,10 @@ MAY-INLINE-P allows inlining it as an image."
(apply 'org-lparse-format-tags tag text prefix suffix args)))
(defun org-odt-init-outfile (filename)
(unless (executable-find "zip")
;; Not at all OSes ship with zip by default
(error "Executable \"zip\" needed for creating OpenDocument files. Aborting."))
(let* ((outdir (make-temp-file org-export-odt-tmpdir-prefix t))
(mimetype-file (expand-file-name "mimetype" outdir))
(content-file (expand-file-name "content.xml" outdir))