diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-11-25 23:31:35 +0100 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2013-11-25 23:34:20 +0100 |
commit | 3ead82a3211c011428289930c33ea9094e602312 (patch) | |
tree | 8b8061975a4171359c8ac418d39cf97cef82a727 | |
parent | 7bee47120b71c3e87e528b809d2661b6b2633c45 (diff) | |
download | org-mode-3ead82a3211c011428289930c33ea9094e602312.tar.gz |
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>
-rw-r--r-- | lisp/ox-publish.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el index 67a57fa..d87326d 100644 --- a/lisp/ox-publish.el +++ b/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) |