]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-index: readonly status was checked wrong when deleting corrupted index files.
authorTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 10:52:18 +0000 (11:52 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 13 Sep 2010 10:52:18 +0000 (11:52 +0100)
src/lib-index/mail-index-map-read.c

index d7af48788b5d619a6d098005a4ebf373199c3c38..a83227cf9ed6eaab5090be4b58b751a3bfc1dfa6 100644 (file)
@@ -433,7 +433,7 @@ int mail_index_map(struct mail_index *index,
                                ret = mail_index_sync_map(&index->map, type,
                                                          TRUE);
                        }
-               } else if (ret == 0 && index->readonly) {
+               } else if (ret == 0 && !index->readonly) {
                        /* make sure we don't try to open the file again */
                        if (unlink(index->filepath) < 0 && errno != ENOENT)
                                mail_index_set_syscall_error(index, "unlink()");