]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imapc: Don't assert-crash when trying to sync a mailbox with MAILBOX_FLAG_SAVEONLY.
authorTimo Sirainen <tss@iki.fi>
Fri, 27 Mar 2015 13:12:50 +0000 (15:12 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 27 Mar 2015 13:12:50 +0000 (15:12 +0200)
We can just skip the sync, because we don't do anything except save mails.

src/lib-storage/index/imapc/imapc-sync.c

index 63b69f7e8746375a52dda67f6d5d8efe2f099405..c26c79ea750d36ccdadc888c8fc56e34255d9ceb 100644 (file)
@@ -488,6 +488,11 @@ static int imapc_sync(struct imapc_mailbox *mbox)
        struct imapc_sync_context *sync_ctx;
        bool force = mbox->sync_fetch_first_uid != 0;
 
+       if ((mbox->box.flags & MAILBOX_FLAG_SAVEONLY) != 0) {
+               /* we're only saving mails here - no syncing actually wanted */
+               return 0;
+       }
+
        if (imapc_sync_begin(mbox, &sync_ctx, force) < 0)
                return -1;
        if (sync_ctx == NULL)