]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Don't set internal error to storage when there's nothing to sync.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 20 Jan 2016 10:55:57 +0000 (12:55 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 20 Jan 2016 10:55:57 +0000 (12:55 +0200)
This may also wrongly overwrite an existing error.

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

index a370f5dd5f605183b759a5a7b4ddd425b1b35c89..339ebbb7d106b3427b56896686285967daedde8f 100644 (file)
@@ -999,7 +999,8 @@ int index_storage_expunged_sync_begin(struct mailbox *box,
        ret = mail_index_sync_begin(box->index, ctx_r, view_r,
                                    trans_r, flags);
        if (ret <= 0) {
-               mailbox_set_index_error(box);
+               if (ret < 0)
+                       mailbox_set_index_error(box);
                index_storage_expunging_deinit(box);
                return ret;
        }