dovecot-2.2: imap: Fail silently if selected mailbox format does...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Aug 25 15:33:17 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/eeefd9b14eec
changeset: 19008:eeefd9b14eec
user: Timo Sirainen <tss at iki.fi>
date: Tue Aug 25 18:32:23 2015 +0300
description:
imap: Fail silently if selected mailbox format doesn't support GUIDs.
diffstat:
src/imap/imap-state.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r c3bea195a020 -r eeefd9b14eec src/imap/imap-state.c
--- a/src/imap/imap-state.c Tue Aug 25 18:27:44 2015 +0300
+++ b/src/imap/imap-state.c Tue Aug 25 18:32:23 2015 +0300
@@ -213,6 +213,7 @@
struct mailbox_status status;
struct mailbox_metadata metadata;
const char *vname = mailbox_get_vname(box);
+ enum mail_error mail_error;
mailbox_get_open_status(box, STATUS_UIDVALIDITY | STATUS_UIDNEXT |
STATUS_MESSAGES | STATUS_HIGHESTMODSEQ |
@@ -224,8 +225,9 @@
}
if (mailbox_get_metadata(box, MAILBOX_METADATA_GUID, &metadata) < 0) {
- *error_r = mailbox_get_last_error(box, NULL);
- return -1;
+ *error_r = mailbox_get_last_error(box, &mail_error);
+ /* if the selected mailbox can't have a GUID, fail silently */
+ return mail_error == MAIL_ERROR_NOTPOSSIBLE ? 0 : -1;
}
buffer_append_c(dest, IMAP_STATE_TYPE_MAILBOX);
More information about the dovecot-cvs
mailing list