aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/pop3/camel-pop3-folder.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/pop3/camel-pop3-folder.c')
-rw-r--r--camel/providers/pop3/camel-pop3-folder.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/camel/providers/pop3/camel-pop3-folder.c b/camel/providers/pop3/camel-pop3-folder.c
index cee18d56ad..d18680dddd 100644
--- a/camel/providers/pop3/camel-pop3-folder.c
+++ b/camel/providers/pop3/camel-pop3-folder.c
@@ -255,16 +255,23 @@ pop3_sync (CamelFolder *folder, gboolean expunge, CamelException *ex)
pop3_folder = CAMEL_POP3_FOLDER (folder);
pop3_store = CAMEL_POP3_STORE (folder->parent_store);
+
+ camel_operation_start(NULL, _("Expunging deleted messages"));
for (i = 0; i < pop3_folder->uids->len; i++) {
+ camel_operation_progress(NULL, (i+1) * 100 / pop3_folder->uids->len);
if (pop3_folder->flags[i] & CAMEL_MESSAGE_DELETED) {
status = camel_pop3_command (pop3_store, NULL, ex,
"DELE %d", i + 1);
- if (status != CAMEL_POP3_OK)
+ if (status != CAMEL_POP3_OK) {
+ camel_operation_end(NULL);
return;
+ }
}
}
-
+
+ camel_operation_end(NULL);
+
camel_pop3_store_expunge (pop3_store, ex);
}