about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-06-19 00:23:27 +0000
committerEric Wong <e@80x24.org>2016-06-19 00:23:27 +0000
commit0c17b6e39fe98a0da0b0deaa4fd014343362a33f (patch)
tree3db20cd6fcced5d5c92e2e36f137c15190ec2e30 /lib
parentd983e59299602acac5d700093ac76c87dbaad10c (diff)
downloadpublic-inbox-0c17b6e39fe98a0da0b0deaa4fd014343362a33f.tar.gz
Because our WatchMaildir module is liberal about what
it accepts, we can potentially have messages without a
subject.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/Import.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/PublicInbox/Import.pm b/lib/PublicInbox/Import.pm
index c13d4834..5ffc26ef 100644
--- a/lib/PublicInbox/Import.pm
+++ b/lib/PublicInbox/Import.pm
@@ -112,8 +112,11 @@ sub remove {
         defined($n) or die "read final byte of cat-blob failed: $!";
         die "bad read on final byte: <$lf>" if $lf ne "\n";
         my $cur = Email::MIME->new($buf);
-        if ($cur->header('Subject') ne $mime->header('Subject') ||
-                        norm_body($cur) ne norm_body($mime)) {
+        my $cur_s = $cur->header('Subject');
+        $cur_s = '' unless defined $cur_s;
+        my $cur_m = $mime->header('Subject');
+        $cur_m = '' unless defined $cur_m;
+        if ($cur_s ne $cur_m || norm_body($cur) ne norm_body($mime)) {
                 return ('MISMATCH', $cur);
         }