]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix xdg timestamp error on 32-bit Emacs
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Oct 2017 07:29:04 +0000 (00:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Oct 2017 07:35:52 +0000 (00:35 -0700)
* lisp/xdg.el (xdg-thumb-mtime): Return an Emacs timestamp,
not an integer.  This avoids signaling an error on 32-bit
Emacs, where timestamps typically do not fit into fixnums
(Bug#28921).

lisp/xdg.el

index 76106f42586ea1106529e84b9ed8e8cf1961ac81..e73e6199d6f0cb8efe461a26898ce882195e421a 100644 (file)
@@ -93,8 +93,8 @@ file:///foo/bar.jpg"
   (concat (md5 (xdg-thumb-uri filename)) ".png"))
 
 (defun xdg-thumb-mtime (filename)
-  "Return modification time of FILENAME as integral seconds from the epoch."
-  (floor (float-time (nth 5 (file-attributes filename)))))
+  "Return modification time of FILENAME as an Emacs timestamp."
+  (file-attribute-modification-time (file-attributes filename)))
 
 \f
 ;; XDG User Directories