]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mbox: Sync write error handling fix.
authorTimo Sirainen <tss@iki.fi>
Sun, 4 Apr 2010 21:29:23 +0000 (00:29 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 4 Apr 2010 21:29:23 +0000 (00:29 +0300)
--HG--
branch : HEAD

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

index 04d05a833ee5637977e7b7695a8541fbb4e243bd..42d7d70120d2f95dfd8e56292835025f20d1b1a9 100644 (file)
@@ -1616,12 +1616,13 @@ static int mbox_sync_do(struct mbox_sync_context *sync_ctx,
                /* Rewrite uid_last in X-IMAPbase header if we've seen it
                   (ie. the file isn't empty) */
                 ret = mbox_rewrite_base_uid_last(sync_ctx);
+       } else {
+               ret = 0;
        }
 
        if (mbox_sync_update_index_header(sync_ctx) < 0)
                return -1;
-
-       return 0;
+       return ret;
 }
 
 int mbox_sync_header_refresh(struct mbox_mailbox *mbox)