summaryrefslogtreecommitdiff
path: root/lisp/gnus/mail-source.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-10-20 22:45:36 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2017-10-20 22:45:36 -0700
commitf400c7b69714c91a714ff0ab5b9f16708daf49b9 (patch)
tree4a6549c67213696481b659654cac312f204f9479 /lisp/gnus/mail-source.el
parent8cedc552463358509dd785f54e58bfaf8099de62 (diff)
parent868eb74f910eb67a5e74ebb1867ebcfbfced55c4 (diff)
downloademacs-f400c7b69714c91a714ff0ab5b9f16708daf49b9.tar.gz
Merge from origin/emacs-26
868eb74f91 Simplify make-progress-reporter vs float-time 83db9a1bba Fix two more minor Gnus typos e655946ce0 Fix two minor Gnus typos 6a00914d6d Tweak Fdocumentation's error for an undefined function 7c63655e39 Tweak format of list of old files in NEWS header # Conflicts: # etc/NEWS
Diffstat (limited to 'lisp/gnus/mail-source.el')
-rw-r--r--lisp/gnus/mail-source.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el
index 3befd46620e..93f03be72d0 100644
--- a/lisp/gnus/mail-source.el
+++ b/lisp/gnus/mail-source.el
@@ -591,25 +591,21 @@ Return the number of files that were found."
If CONFIRM is non-nil, ask for confirmation before removing a file."
(interactive "P")
(require 'gnus-util)
- (let* ((high2days (/ 65536.0 60 60 24));; convert high bits to days
- (low2days (/ 1.0 65536.0)) ;; convert low bits to days
+ (let* ((now (current-time))
(diff (if (natnump age) age 30));; fallback, if no valid AGE given
- currday files)
+ files)
(setq files (directory-files
mail-source-directory t
(concat "\\`"
- (regexp-quote mail-source-incoming-file-prefix)))
- currday (* (car (current-time)) high2days)
- currday (+ currday (* low2days (nth 1 (current-time)))))
+ (regexp-quote mail-source-incoming-file-prefix))))
(while files
(let* ((ffile (car files))
(bfile (replace-regexp-in-string "\\`.*/\\([^/]+\\)\\'" "\\1"
ffile))
- (filetime (nth 5 (file-attributes ffile)))
- (fileday (* (car filetime) high2days))
- (fileday (+ fileday (* low2days (nth 1 filetime)))))
+ (filetime (nth 5 (file-attributes ffile))))
(setq files (cdr files))
- (when (and (> (- currday fileday) diff)
+ (when (and (> (time-to-number-of-days (time-subtract now filetime))
+ diff)
(if confirm
(y-or-n-p
(format-message "\