Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6046:b407586a5107 HEAD
Get UIDVALIDITY after transaction was committed. It may have changed.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 18 Jul 2007 00:02:31 +0300 |
parents | 840fb333defd |
children | f35ef260987c |
files | src/imap/cmd-copy.c |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/cmd-copy.c Tue Jul 17 23:58:58 2007 +0300 +++ b/src/imap/cmd-copy.c Wed Jul 18 00:02:31 2007 +0300 @@ -135,12 +135,6 @@ MAILBOX_TRANSACTION_FLAG_ASSIGN_UIDS); ret = fetch_and_copy(client, t, search_arg, &src_uidset, ©_count); - if (ret > 0 && - mailbox_get_status(destbox, STATUS_UIDVALIDITY, &status) < 0) { - client_send_storage_error(cmd, storage); - ret = -1; - } - if (ret <= 0) mailbox_transaction_rollback(&t); else if (mailbox_transaction_commit_get_uids(&t, 0, &uid1, &uid2) < 0) @@ -148,7 +142,10 @@ else { i_assert(copy_count == uid2 - uid1 + 1); - if (uid1 == uid2) { + if (mailbox_get_status(destbox, STATUS_UIDVALIDITY, + &status) < 0) { + msg = "OK Copy completed. UIDVALIDITY lookup failed."; + } else if (uid1 == uid2) { msg = t_strdup_printf("OK [COPYUID %u %s %u] " "Copy completed.", status.uidvalidity,