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.
This commit is contained in:
Markus Armbruster 2011-11-23 20:24:51 +01:00
parent b6f666cff9
commit 8b7591f5d7

View file

@ -68,7 +68,7 @@ rea(void)
time_t now; time_t now;
time_t then; time_t then;
time_t delta; time_t delta;
int may_delete = 1; /* may messages be deleted? */ int may_delete = 1;
now = time(NULL); now = time(NULL);
@ -129,8 +129,10 @@ rea(void)
if (res < 0) if (res < 0)
break; break;
} }
if (res < 0) if (res < 0) {
pr("\n> Mailbox corrupt, tell the deity.\n"); pr("\n> Mailbox corrupt, tell the deity.\n");
may_delete = 0;
}
if (*kind == 'a') if (*kind == 'a')
np->nat_ann = 0; np->nat_ann = 0;