Преглед изворни кода

ox-odt: Fix End of file during parsing error

* lisp/ox-odt.el (org-odt-template): Do not call `read' on an empty
  string.

Reported-by: Damien Cassou <damien@cassou.me>
<http://permalink.gmane.org/gmane.emacs.orgmode/104947>
Nicolas Goaziou пре 9 година
родитељ
комит
07ee690dce
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      lisp/ox-odt.el

+ 2 - 1
lisp/ox-odt.el

@@ -1383,7 +1383,8 @@ original parsed data.  INFO is a plist holding export options."
   ;; Copy styles.xml.  Also dump htmlfontify styles, if there is any.
   ;; Write styles file.
   (let* ((styles-file (plist-get info :odt-styles-file))
-	 (styles-file (and styles-file (read (org-trim styles-file))))
+	 (styles-file (and (org-string-nw-p styles-file)
+			   (read (org-trim styles-file))))
 	 ;; Non-availability of styles.xml is not a critical
 	 ;; error. For now, throw an error.
 	 (styles-file (or styles-file