Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9209:76cff789dae2 HEAD
expire plugin: If a transaction expunges all messages and saves a new one, don't delete expire row.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 07 Jul 2009 23:30:51 -0400 |
parents | 5d1a52e8d320 |
children | df2d4e398c06 |
files | src/plugins/expire/expire-plugin.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/expire/expire-plugin.c Tue Jul 07 22:52:01 2009 -0400 +++ b/src/plugins/expire/expire-plugin.c Tue Jul 07 23:30:51 2009 -0400 @@ -126,7 +126,11 @@ key = t_strconcat(DICT_EXPIRE_PREFIX, box->storage->ns->user->username, "/", box->storage->ns->prefix, box->name, NULL); - if (!xt->first_expunged && xt->saves) { + if (xt->first_expunged) { + if (new_stamp == 0 && xt->saves) + new_stamp = ioloop_time; + } else { + i_assert(xt->saves); /* saved new mails. dict needs to be updated only if this is the first mail in the database */ ret = dict_lookup(expire.db, pool_datastack_create(),