From: Markus Armbruster Date: Wed, 23 Nov 2011 19:24:51 +0000 (+0100) Subject: Change read and wire to never delete a corrupt mailbox X-Git-Tag: v4.3.29~7 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=8b7591f5d710409c75bcd03b28e0861231a115e5 Change read and wire to never delete a corrupt mailbox Before, rea() deleted the mailbox regardless of errors. Acceptable only when the user gets a chance to avoid that after the problem is reported. Not the case for "read y". Not an issue for announcements, but treat them the same for simplicity. --- diff --git a/src/lib/commands/rea.c b/src/lib/commands/rea.c index 94ba14d42..c4693db61 100644 --- a/src/lib/commands/rea.c +++ b/src/lib/commands/rea.c @@ -68,7 +68,7 @@ rea(void) time_t now; time_t then; time_t delta; - int may_delete = 1; /* may messages be deleted? */ + int may_delete = 1; now = time(NULL); @@ -129,8 +129,10 @@ rea(void) if (res < 0) break; } - if (res < 0) + if (res < 0) { pr("\n> Mailbox corrupt, tell the deity.\n"); + may_delete = 0; + } if (*kind == 'a') np->nat_ann = 0;