aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/providers/imap/camel-imap-folder.c22
2 files changed, 26 insertions, 6 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 24fdb1bdc6..5fcb8b2e84 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,13 @@
+2002-07-24 Peter Williams <peterw@ximian.com>
+
+ * providers/imap/camel-imap-folder.c (imap_expunge_uids_resyncing): It
+ would help to mark the UIDs as deleted before we try to expunge them
+ (in the case when no other UIDs were marked deleted this didn't happen.)
+ Also fix an FMR.
+ (imap_expunge_uids_offline): Trigger a folder_changed event with our
+ own changeinfo because camel_imap_response_free won't be able to do that
+ for us.
+
2002-07-25 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-driver.c (do_shell): Renamed from
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 60c3979b03..cd82fb29aa 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -800,18 +800,25 @@ imap_sync_online (CamelFolder *folder, CamelException *ex)
static void
imap_expunge_uids_offline (CamelFolder *folder, GPtrArray *uids, CamelException *ex)
{
+ CamelFolderChangeInfo *changes;
int i;
+
+ changes = camel_folder_change_info_new ();
for (i = 0; i < uids->len; i++) {
camel_folder_summary_remove_uid (folder->summary, uids->pdata[i]);
+ camel_folder_change_info_remove_uid (changes, uids->pdata[i]);
/* We intentionally don't remove it from the cache because
* the cached data may be useful in replaying a COPY later.
*/
}
camel_folder_summary_save (folder->summary);
-
+
camel_disco_diary_log (CAMEL_DISCO_STORE (folder->parent_store)->diary,
CAMEL_DISCO_DIARY_FOLDER_EXPUNGE, folder, uids);
+
+ camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes);
+ camel_folder_change_info_free (changes);
}
static void
@@ -948,12 +955,11 @@ imap_expunge_uids_resyncing (CamelFolder *folder, GPtrArray *uids, CamelExceptio
*/
keep_uids = NULL;
- mark_uids = NULL;
+ mark_uids = uids;
}
- g_free (result);
-
/* Unmark messages to be kept */
+
if (keep_uids) {
char *uidset;
int uid = 0;
@@ -999,8 +1005,9 @@ imap_expunge_uids_resyncing (CamelFolder *folder, GPtrArray *uids, CamelExceptio
}
camel_imap_response_free (store, response);
}
-
- g_ptr_array_free (mark_uids, TRUE);
+
+ if (mark_uids != uids)
+ g_ptr_array_free (mark_uids, TRUE);
}
/* Do the actual expunging */
@@ -1029,6 +1036,9 @@ imap_expunge_uids_resyncing (CamelFolder *folder, GPtrArray *uids, CamelExceptio
g_ptr_array_free (keep_uids, TRUE);
}
+
+ /* now we can free this, now that we're done with keep_uids */
+ g_free (result);
CAMEL_IMAP_STORE_UNLOCK (store, command_lock);
}