From 88a155c17a0affeba6973b6f59994a9ee8d8c5b9 Mon Sep 17 00:00:00 2001 From: dakkar Date: Fri, 27 Dec 2019 16:06:20 +0000 Subject: skip non-mails based on name, first this saves us trying to parse stuff that we then wouldn't use --- lib/MaildirIndexer/Store.pm6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/MaildirIndexer/Store.pm6 b/lib/MaildirIndexer/Store.pm6 index e1f2c5e..2c60233 100644 --- a/lib/MaildirIndexer/Store.pm6 +++ b/lib/MaildirIndexer/Store.pm6 @@ -30,8 +30,8 @@ method start() { } method add-file(IO:D $file) { - my $email = parse-email($file,:headers-only); my $mailbox = mailbox-from-path($file.path) or return; + my $email = parse-email($file,:headers-only); $!lock.protect: { .add-mail($email,$mailbox) for @!indices; } -- cgit v1.2.3