bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28921: [PROPOSED] Fix xdg timestamp error on 32-bit Emacs


From: Tino Calancha
Subject: bug#28921: [PROPOSED] Fix xdg timestamp error on 32-bit Emacs
Date: Sat, 21 Oct 2017 18:11:24 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Paul Eggert <eggert@cs.ucla.edu> writes:

>  (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."
> +  (nth 5 (file-attributes filename)))
Maybe you could use here the new accesor `file-attribute-modification-time':

diff --git a/lisp/xdg.el b/lisp/xdg.el
index 4250faaeb4..9edc3d2629 100644
--- a/lisp/xdg.el
+++ b/lisp/xdg.el
@@ -94,8 +94,8 @@ xdg-thumb-name
   (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)))
 
 
 ;; XDG User Directories





reply via email to

[Prev in Thread] Current Thread [Next in Thread]