From 8b7591f5d710409c75bcd03b28e0861231a115e5 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Wed, 23 Nov 2011 20:24:51 +0100 Subject: [PATCH] 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. --- src/lib/commands/rea.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; -- 2.43.0