From: Eric Gillespie Date: Tue, 9 Dec 2014 23:43:16 +0000 (-0800) Subject: ah, silly me; there was no bug after all; fix up guess-code X-Git-Url: https://diplodocus.org/git/minc/commitdiff_plain/c2787037899589560e17dcf33a3fa285b6cf6ad4?hp=1a04e109d11d6d91bf108e41a85fdc37f77b50ec ah, silly me; there was no bug after all; fix up guess-code --- diff --git a/minc b/minc index 7e6ed2f..eb282b3 100755 --- a/minc +++ b/minc @@ -873,23 +873,19 @@ if (!caller()) { # approaches has those problems, and the solution is always the same: # my @filtered; # sub store_message { - # my $msg = shift; + # my $msg = shift; # rename $src_msg # my $mhfolder = shift; - # my $mhmsg; + # my ($msgnum, $mhmsg); # rename $dst_msg and $dst_msgpath # # ... # # XXX don't hard-code inbox # if ($mhfolder eq 'inbox') { # # If @filtered is empty, this message already has the right number. - # $mhmsg = shift(@filtered) || next; + # $msgnum = shift(@filtered) || next; + # $mhmsg = "$mh/$mhfolder/$msgnum"; # } else { - # # $mhmsg = get_highest_msgnum() and search - # # XXX Holy crap, there's an ancient bug here! I call mark on - # # $msgnum instead of $mhmsg! I bet the retry when message number is - # # claimed has never actually executed; after all, I've never refiled - # # messages or anything while minc was running; until this week, it - # # wasn't safe since I wasn't locking! + # # $msgnum = get_highest_msgnum() and search # # XXX don't hard-code unseen - # mark($mhfolder, $mhmsg, 'unseen'); + # mark($mhfolder, $msgnum, 'unseen'); # } # push(@filtered, $msg); # rename($msg, $mhmsg);