diff options
| author | Paul Eggert | 2017-10-22 00:29:04 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-10-22 00:35:52 -0700 |
| commit | 2bfa42855bf0278497f2e4540eac2086dab254c3 (patch) | |
| tree | 03d7de67c915969b39ef4a02a1946b76b4e9639e | |
| parent | 237e96bc5259e59ac5623a93a47f64abffab4e0b (diff) | |
| download | emacs-2bfa42855bf0278497f2e4540eac2086dab254c3.tar.gz emacs-2bfa42855bf0278497f2e4540eac2086dab254c3.zip | |
Fix xdg timestamp error on 32-bit Emacs
* 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).
| -rw-r--r-- | lisp/xdg.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/xdg.el b/lisp/xdg.el index 76106f42586..e73e6199d6f 100644 --- a/lisp/xdg.el +++ b/lisp/xdg.el | |||
| @@ -93,8 +93,8 @@ file:///foo/bar.jpg" | |||
| 93 | (concat (md5 (xdg-thumb-uri filename)) ".png")) | 93 | (concat (md5 (xdg-thumb-uri filename)) ".png")) |
| 94 | 94 | ||
| 95 | (defun xdg-thumb-mtime (filename) | 95 | (defun xdg-thumb-mtime (filename) |
| 96 | "Return modification time of FILENAME as integral seconds from the epoch." | 96 | "Return modification time of FILENAME as an Emacs timestamp." |
| 97 | (floor (float-time (nth 5 (file-attributes filename))))) | 97 | (file-attribute-modification-time (file-attributes filename))) |
| 98 | 98 | ||
| 99 | 99 | ||
| 100 | ;; XDG User Directories | 100 | ;; XDG User Directories |