Skip to content

Commit

Permalink
Actually stop when reading an mbox file.
Browse files Browse the repository at this point in the history
Due to a logic bug, read_message() would forever return a new empty
message with no headers or body, instead of the expected undef.
  • Loading branch information
Greg Banks committed Mar 4, 2011
1 parent 7382847 commit a751920
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Cassandane/MboxMessageStore.pm
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,13 @@ sub read_message
unless m/^From /;
next;
}
last if m/^From /;
return Cassandane::Message->new(lines => \@lines)
if m/^From /;

push(@lines, $_);
}

return Cassandane::Message->new(lines => \@lines);
return undef;
}

sub read_end
Expand Down

0 comments on commit a751920

Please sign in to comment.