(nnimap-update-info): Protect against nil uidnexts.
authorLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Fri, 24 Sep 2010 17:42:04 +0000 (19:42 +0200)
committerLars Magne Ingebrigtsen <larsi@quimbies.gnus.org>
Fri, 24 Sep 2010 17:42:04 +0000 (19:42 +0200)
lisp/ChangeLog
lisp/nnimap.el

index 0c3b118..551b4c8 100644 (file)
@@ -1,5 +1,7 @@
 2010-09-24  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnimap.el (nnimap-update-info): Protect against nil uidnexts.
+
        * gnus-cache.el (gnus-cache-braid-heads): When braiding heads, don't
        use the same article number for all the cached articles.
 
index 7f88685..16a4342 100644 (file)
@@ -824,12 +824,20 @@ not done by default on servers that doesn't support that command.")
        (if (or completep
                (not (gnus-active group)))
            (gnus-set-active group
-                            (if (and low high)
-                                (cons low high)
+                            (cond
+                             ((and low high)
+                              (cons low high))
+                             (uidnext
                               ;; No articles in this group.
-                              (cons uidnext (1- uidnext))))
+                              (cons uidnext (1- uidnext)))
+                             (start-article
+                              (cons start-article (1- start-article)))
+                             (t
+                              ;; No articles and no uidnext.
+                              nil)))
          (setcdr (gnus-active group) (or high (1- uidnext))))
-       (unless high
+       (when (and (not high)
+                  uidnext)
          (setq high (1- uidnext)))
        ;; Then update the list of read articles.
        (let* ((unread