From: epg <> Date: Sun, 25 Aug 2002 22:26:40 +0000 (+0000) Subject: (store_message): Test for failure when mark(1)ing the message unseen. X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/9c4a0646d2211664fa7122bd7af538ca382aa997?hp=1f7d1f021e1aeb2cf466bf23e4858cc8b157695f (store_message): Test for failure when mark(1)ing the message unseen. --- diff --git a/minc b/minc index a534abc..5b5b6d1 100755 --- a/minc +++ b/minc @@ -275,6 +275,7 @@ sub store_message { my $mhfolder = shift; my $mhmsg; my $msgnum; + my $status; # We must do this even in -n mode because later steps fail without # it. This should be harmless. @@ -292,7 +293,10 @@ sub store_message { } if ($mhfolder ne 'SPAM') { - system("mark +$mhfolder $msgnum -sequence unseen -add"); + $status = system("mark +$mhfolder $msgnum -sequence unseen -add"); + if (not (WIFEXITED($status) and WEXITSTATUS($status) == 0)) { + errx(&EX_TEMPFAIL, "Failed to mark message unseen"); + } } }