dovecot: Handle setting deleted mailboxes to nonexistent.
dovecot at dovecot.org
dovecot at dovecot.org
Wed Jul 18 03:53:09 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/4d14254bc40a
changeset: 6057:4d14254bc40a
user: Timo Sirainen <tss at iki.fi>
date: Wed Jul 18 03:15:08 2007 +0300
description:
Handle setting deleted mailboxes to nonexistent.
diffstat:
1 file changed, 16 insertions(+)
src/lib-index/mailbox-list-index-sync.c | 16 ++++++++++++++++
diffs (35 lines):
diff -r b06dfb878783 -r 4d14254bc40a src/lib-index/mailbox-list-index-sync.c
--- a/src/lib-index/mailbox-list-index-sync.c Wed Jul 18 02:26:08 2007 +0300
+++ b/src/lib-index/mailbox-list-index-sync.c Wed Jul 18 03:15:08 2007 +0300
@@ -30,7 +30,10 @@ struct mailbox_list_sync_record {
uint32_t dir_offset;
uint32_t created:1;
+ /* This record was seen while syncing, either as parent or as leaf */
uint32_t seen:1;
+ /* This record was seen as leaf while syncing, so it exists */
+ uint32_t exists:1;
};
struct mailbox_list_sync_dir {
@@ -273,7 +276,20 @@ mailbox_list_index_sync_int(struct mailb
if (p == NULL) {
/* leaf */
+ rec->exists = TRUE;
+ mail_index_update_flags(ctx->trans, rec->seq,
+ MODIFY_REMOVE,
+ MAILBOX_LIST_INDEX_FLAG_NONEXISTENT);
break;
+ }
+
+ /* we were handling a parent, continue with its child */
+ if (!rec->exists) {
+ /* Mark this mailbox non-existent for now. If it
+ exists, this flag is removed later. */
+ mail_index_update_flags(ctx->trans, rec->seq,
+ MODIFY_ADD,
+ MAILBOX_LIST_INDEX_FLAG_NONEXISTENT);
}
if (rec->dir == NULL) {
More information about the dovecot-cvs
mailing list