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

ox-publish: Error when publishing non-existent file

* lisp/ox-publish.el (org-publish-cache-ctime-of-src): Return an error
  when publishing a non-existent file.

Suggested-by: Arne Babenhauserheide <arne_bab@web.de>
Nicolas Goaziou пре 11 година
родитељ
комит
3ead82a321
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      lisp/ox-publish.el

+ 3 - 2
lisp/ox-publish.el

@@ -1225,8 +1225,9 @@ Returns value on success, else nil."
   (let ((attr (file-attributes
 	       (expand-file-name (or (file-symlink-p file) file)
 				 (file-name-directory file)))))
-    (+ (lsh (car (nth 5 attr)) 16)
-       (cadr (nth 5 attr)))))
+    (if (not attr) (error "No such file: \"%s\"" file)
+      (+ (lsh (car (nth 5 attr)) 16)
+	 (cadr (nth 5 attr))))))
 
 
 (provide 'ox-publish)