>= is not appropriate here because the sequences are 1-based; so seq =
authorPeter Williams <peterw@ximian.com>
Mon, 15 Jul 2002 19:18:12 +0000 (19:18 +0000)
committerPeter Williams <peterw@src.gnome.org>
Mon, 15 Jul 2002 19:18:12 +0000 (19:18 +0000)
2002-07-15  Peter Williams  <peterw@ximian.com>

* providers/imap/camel-imap-folder.c (imap_rescan): >= is not appropriate
here because the sequences are 1-based; so seq = summary_len is valid.
Hopefully addresses 15646, because this caused the last message in a folder
to be reloaded, replacing its CamelMessageInfo, and the tree view was using
the old CamelMessageInfo.

camel/ChangeLog
camel/providers/imap/camel-imap-folder.c

index 18770d4..026623a 100644 (file)
@@ -1,3 +1,11 @@
+2002-07-15  Peter Williams  <peterw@ximian.com>
+
+       * providers/imap/camel-imap-folder.c (imap_rescan): >= is not appropriate
+       here because the sequences are 1-based; so seq = summary_len is valid. 
+       Hopefully addresses 15646, because this caused the last message in a folder
+       to be reloaded, replacing its CamelMessageInfo, and the tree view was using
+       the old CamelMessageInfo.
+
 2002-07-13  Not Zed  <NotZed@Ximian.com>
 
        * camel-folder-summary.c
index a437024..ee8a7b1 100644 (file)
@@ -550,7 +550,7 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
                uid = g_datalist_get_data (&data, "UID");
                flags = GPOINTER_TO_UINT (g_datalist_get_data (&data, "FLAGS"));
                
-               if (!uid || !seq || seq >= summary_len) {
+               if (!uid || !seq || seq > summary_len) {
                        g_datalist_clear (&data);
                        continue;
                }
@@ -628,9 +628,10 @@ imap_rescan (CamelFolder *folder, int exists, CamelException *ex)
         * repeatedly add the same number to the removed array.
         * See RFC2060 7.4.1)
         */
+
        for (i = seq; i <= summary_len; i++)
                g_array_append_val (removed, seq);
-       
+
        /* And finally update the summary. */
        camel_imap_folder_changed (folder, exists, removed, ex);
        g_array_free (removed, TRUE);