]> diplodocus.org Git - minc/commitdiff
(store_message): Explain why marking is done for each message individually.
authorepg <>
Sun, 1 Sep 2002 05:50:06 +0000 (05:50 +0000)
committerepg <>
Sun, 1 Sep 2002 05:50:06 +0000 (05:50 +0000)
minc

diff --git a/minc b/minc
index 0e6135a..a572cfe 100755 (executable)
--- 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)) {