From ac9cea6dde28ef3b597d19a4f2b1a06f42b15d8a Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Mon, 15 Jul 2002 19:18:12 +0000 Subject: >= is not appropriate here because the sequences are 1-based; so seq = 2002-07-15 Peter Williams * 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. svn path=/trunk/; revision=17460 --- camel/ChangeLog | 8 ++++++++ camel/providers/imap/camel-imap-folder.c | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 18770d4a01..026623a114 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2002-07-15 Peter Williams + + * 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 * camel-folder-summary.c diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index a437024991..ee8a7b1f4a 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -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); -- cgit v1.2.3