]> git.eshelyaron.com Git - emacs.git/commitdiff
nnimap.el (nnimap-request-head): Protect against not finding the article by Message-ID.
authorLars Ingebrigtsen <larsi@gnus.org>
Sun, 30 Jan 2011 01:46:32 +0000 (01:46 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 30 Jan 2011 01:46:32 +0000 (01:46 +0000)
lisp/gnus/ChangeLog
lisp/gnus/nnimap.el

index 40aa931e62f5a861b62ca5fe7d4b157e5a9aed4a..a9efd57c5de8da16f8ece3d3635c1cf4c2968ed7 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-30  Lars Ingebrigtsen  <larsi@gnus.org>
+
+       * nnimap.el (nnimap-request-head): Protect against not finding the
+       article by Message-ID.
+
 2011-01-29  Lars Ingebrigtsen  <larsi@gnus.org>
 
        * gnus-art.el (article-update-date-lapsed): Try a better way to really
index 6f7383062dbd0b41d34a169dbc1e58723bbe93f5..04e4bd6c9a2385cb51c011dcd9321eb8658ed20f 100644 (file)
@@ -519,15 +519,17 @@ textual parts.")
     (with-current-buffer (nnimap-buffer)
       (when (stringp article)
        (setq article (nnimap-find-article-by-message-id group article)))
-      (nnimap-get-whole-article
-       article (format "UID FETCH %%d %s"
-                      (nnimap-header-parameters)))
-      (let ((buffer (current-buffer)))
-       (with-current-buffer (or to-buffer nntp-server-buffer)
-         (erase-buffer)
-         (insert-buffer-substring buffer)
-         (nnheader-ms-strip-cr)
-         (cons group article))))))
+      (if (null article)
+         nil
+       (nnimap-get-whole-article
+        article (format "UID FETCH %%d %s"
+                        (nnimap-header-parameters)))
+       (let ((buffer (current-buffer)))
+         (with-current-buffer (or to-buffer nntp-server-buffer)
+           (erase-buffer)
+           (insert-buffer-substring buffer)
+           (nnheader-ms-strip-cr)
+           (cons group article)))))))
 
 (defun nnimap-get-whole-article (article &optional command)
   (let ((result