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:
parent
b6f666cff9
commit
8b7591f5d7
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue