]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mdbox: Don't try to undelete any mailboxes in storage rebuild to avoid assert-crashes.
authorTimo Sirainen <tss@iki.fi>
Fri, 22 Feb 2013 07:43:59 +0000 (09:43 +0200)
committerTimo Sirainen <tss@iki.fi>
Fri, 22 Feb 2013 07:43:59 +0000 (09:43 +0200)
src/lib-storage/mail-storage.c

index 4351b67272a5e825c8bc208c2bc0c04a0e755761..a1736a90d494e9cb291fc5eb2b4cbf810e9c4cd4 100644 (file)
@@ -928,6 +928,13 @@ static bool mailbox_try_undelete(struct mailbox *box)
 {
        time_t mtime;
 
+       if ((box->flags & MAILBOX_FLAG_READONLY) != 0) {
+               /* most importantly we don't do this because we want to avoid
+                  a loop: mdbox storage rebuild -> mailbox_open() ->
+                  mailbox_mark_index_deleted() -> mailbox_sync() ->
+                  mdbox storage rebuild. */
+               return FALSE;
+       }
        if (mail_index_get_modification_time(box->index, &mtime) < 0)
                return FALSE;
        if (mtime + MAILBOX_DELETE_RETRY_SECS > time(NULL))