]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei refresh-mail-sync: drop unused {verify} code path
authorEric Wong <e@80x24.org>
Fri, 17 Sep 2021 01:56:42 +0000 (20:56 -0500)
committerEric Wong <e@80x24.org>
Fri, 17 Sep 2021 04:41:06 +0000 (04:41 +0000)
That option was never wired up, and probably not needed...

lib/PublicInbox/LeiRefreshMailSync.pm

index 71fc348c491e9850f01151b7577d7b9dd44539bd..4cae1536047616e0e625dad550c201daee8c5bdf 100644 (file)
@@ -9,27 +9,12 @@ use v5.10.1;
 use parent qw(PublicInbox::IPC PublicInbox::LeiInput);
 use PublicInbox::LeiExportKw;
 use PublicInbox::InboxWritable qw(eml_from_path);
-use PublicInbox::ContentHash qw(git_sha);
 use PublicInbox::Import;
 
-sub eml_match ($$) {
-       my ($eml, $oidbin) = @_;
-       $eml->header_set($_) for @PublicInbox::Import::UNWANTED_HEADERS;
-       $oidbin eq git_sha(length($oidbin) == 20 ? 1 : 256, $eml)->digest;
-}
-
 sub prune_mdir { # lms->each_src callback
        my ($oidbin, $id, $self, $mdir) = @_;
        my @try = $$id =~ /:2,[a-zA-Z]*\z/ ? qw(cur new) : qw(new cur);
-       for my $d (@try) {
-               my $src = "$mdir/$d/$$id";
-               if ($self->{verify}) {
-                       my $eml = eml_from_path($src) // next;
-                       return if eml_match($eml, $oidbin);
-               } elsif (-f $src) {
-                       return;
-               }
-       }
+       for (@try) { return if -f "$mdir/$_/$$id" }
        # both tries failed
        $self->{lei}->{sto}->ipc_do('lms_clear_src', "maildir:$mdir", $id);
 }