From: epg <> Date: Sun, 1 Sep 2002 05:50:06 +0000 (+0000) Subject: (store_message): Explain why marking is done for each message individually. X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/6f957f340e30cf3c502783735619ed05e3a0d147?hp=c68695d2fad241c53969d25d8081edcf8f57a1bb (store_message): Explain why marking is done for each message individually. --- diff --git a/minc b/minc index 0e6135a..a572cfe 100755 --- a/minc +++ b/minc @@ -390,11 +390,10 @@ sub store_message { err(&EX_TEMPFAIL, "Failed rename($msg, $mhmsg)"); } - # XXX: Lame! Instead, keep a hash of arrays. Keys are folder - # names, array elements are message numbers in that list. - # Then after all the messages have been sorted, run one mark - # command per folder, marking all messages for that folder in - # one sweep. + # Mark each message as soon as we store it and bomb if that + # fails. While it is slow, it is not safe to store multiple + # messages and then have a failure before marking some (or + # all). if ($mhfolder ne 'SPAM') { $status = system("mark +$mhfolder $msgnum -sequence unseen -add"); if (not (WIFEXITED($status) and WEXITSTATUS($status) == 0)) {