summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-09 00:32:13 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-13 15:07:47 +0100
commit20c0c49d098ff6fd8e37770c5ee92b4676c59e37 (patch)
treeb950694caddb6b4d3dd69180fad0a5c9b1bfe8fd
parent0b148ba7061730d3f0fb45d1080dded26a87bc3d (diff)
downloadorg-mode-20c0c49d098ff6fd8e37770c5ee92b4676c59e37.tar.gz
ox-publish: Fix arithmetic range error on some systems
* lisp/ox-publish.el (org-publish-cache-file-needs-publishing): (org-publish-cache-ctime-of-src): Use internal time format for timestamps. Reported-by: Colin Baxter <m43cap@yandex.com> <http://lists.gnu.org/r/emacs-orgmode/2019-02/msg00072.html>
-rw-r--r--lisp/ox-publish.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index d9fc8d2..3aeeacb 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -1314,8 +1314,9 @@ the file including them will be republished as well."
(unless visiting (kill-buffer buf)))))
(or (null pstamp)
(let ((ctime (org-publish-cache-ctime-of-src filename)))
- (or (< pstamp ctime)
- (cl-some (lambda (ct) (< ctime ct)) included-files-ctime))))))
+ (or (time-less-p pstamp ctime)
+ (cl-some (lambda (ct) (time-less-p ctime ct))
+ included-files-ctime))))))
(defun org-publish-cache-set-file-property
(filename property value &optional project-name)
@@ -1365,8 +1366,8 @@ does not exist."
(let ((attr (file-attributes
(expand-file-name (or (file-symlink-p file) file)
(file-name-directory file)))))
- (if (not attr) (error "No such file: \"%s\"" file)
- (floor (float-time (file-attribute-modification-time attr))))))
+ (if attr (file-attribute-modification-time attr)
+ (error "No such file: %S" file))))
(provide 'ox-publish)