Просмотр исходного кода

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.
Jambunathan K 14 лет назад
Родитель
Сommit
3e2057732a
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      contrib/lisp/org-odt.el

+ 4 - 0
contrib/lisp/org-odt.el

@@ -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))