(nnmail-fancy-expiry-target): Protect against invalid date header;
authorKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 21 Nov 2005 23:18:52 +0000 (23:18 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Mon, 21 Nov 2005 23:18:52 +0000 (23:18 +0000)
 use current-time instead of current-time-string.

lisp/ChangeLog
lisp/nnmail.el

index e2ab6eb..8baa420 100644 (file)
@@ -1,3 +1,13 @@
+2005-11-22  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * nnmail.el (nnmail-fancy-expiry-target): Use current-time instead
+       of current-time-string.
+
+2005-11-20  Stefan Schimanski  <schimmi@debian.org>  (tiny change)
+
+       * nnmail.el (nnmail-fancy-expiry-target): Protect against invalid
+       date header.
+
 2005-11-19  Kevin Greiner  <kevin.greiner@compsol.cc>
 
        * gnus-sum.el (gnus-fetch-old-headers): Updated docs to warn that
@@ -18,7 +28,7 @@
 
 2005-11-17  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
-       * flow-fill.el (fill-flowed): Bind adaptive-fill-mode to nil. 
+       * flow-fill.el (fill-flowed): Bind adaptive-fill-mode to nil.
 
 2005-11-16  Boris Samorodov <bsam@ipt.ru>  (tiny patch)
 
index 4211978..cb6657d 100644 (file)
@@ -1867,9 +1867,15 @@ See the Info node `(gnus)Fancy Mail Splitting' for more details."
         (case-fold-search nil)
         (from (or (message-fetch-field "from") ""))
         (to (or (message-fetch-field "to") ""))
-        (date (date-to-time
-               (or (message-fetch-field "date") (current-time-string))))
+        (date (message-fetch-field "date"))
         (target 'delete))
+    (setq date (if date
+                  (condition-case err
+                      (date-to-time date)
+                    (error
+                     (message "%s" (error-message-string err))
+                     (current-time)))
+                (current-time)))
     (dolist (regexp-target-pair (reverse nnmail-fancy-expiry-targets) target)
       (setq header (car regexp-target-pair))
       (cond