X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/ebd71fa45bb0538e65e3106de57a04ae6c70abae..7253abffef36f7eb39ca606a08793560c0d4cfd8:/uip/rmm.c diff --git a/uip/rmm.c b/uip/rmm.c index 897c5028..ee602b45 100644 --- a/uip/rmm.c +++ b/uip/rmm.c @@ -104,7 +104,7 @@ main (int argc, char **argv) adios (maildir, "unable to change directory to"); /* read folder and create message structure */ - if (!(mp = folder_read (folder))) + if (!(mp = folder_read (folder, 1))) adios (NULL, "unable to read folder %s", folder); /* check for empty folder */ @@ -118,24 +118,16 @@ main (int argc, char **argv) seq_setprev (mp); /* set the previous-sequence */ /* - * This is hackish. If we are using a external rmmproc, - * then we need to update the current folder in the - * context so the external rmmproc will remove files - * from the correct directory. This should be moved to - * folder_delmsgs(). + * As part of the new world locking order, folder_delmsgs() now updates + * the sequence and context for us. But since folder_delmsgs() doesn't + * have access to the folder name, change the context now. */ - if (rmmproc) { - context_replace (pfolder, folder); - context_save (); - fflush (stdout); - } + + context_replace (pfolder, folder); /* "remove" the SELECTED messages */ folder_delmsgs (mp, unlink_msgs, 0); - seq_save (mp); /* synchronize message sequences */ - context_replace (pfolder, folder); /* update current folder */ - context_save (); /* save the context file */ folder_free (mp); /* free folder structure */ done (0); return 1;