X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiMailSync.pm;h=e70cb5de2b6b5046736ba72feeeb51a05a6bdf7b;hp=c6cd1bc58d0ae0b5d676b56288680f8dbb5c0eda;hb=9f8e28a80374e905c831d2d5f3a45c6a9d708fa3;hpb=4c6d7f06985840068340f33eef81dcf7eb8209e0 diff --git a/lib/PublicInbox/LeiMailSync.pm b/lib/PublicInbox/LeiMailSync.pm index c6cd1bc5..e70cb5de 100644 --- a/lib/PublicInbox/LeiMailSync.pm +++ b/lib/PublicInbox/LeiMailSync.pm @@ -48,7 +48,7 @@ sub lms_pause { my ($self) = @_; $self->{fmap} = {}; my $dbh = delete $self->{dbh}; - $dbh->do('PRAGMA optimize') if $dbh; + eval { $dbh->do('PRAGMA optimize') } if $dbh; } sub create_tables { @@ -339,9 +339,12 @@ WHERE b.oidbin = ? next unless -s $fh; local $/; my $raw = <$fh>; - if ($vrfy && git_sha(1, \$raw)->hexdigest ne $oidhex) { - warn "$f changed $oidhex\n"; - next; + if ($vrfy) { + my $got = git_sha(1, \$raw)->hexdigest; + if ($got ne $oidhex) { + warn "$f changed $oidhex => $got\n"; + next; + } } return \$raw; } @@ -466,7 +469,7 @@ sub arg2folder { # using `$res' instead of `$orig' EOM } else { - $lei->err($res) if defined $res; + warn($res, "\n") if defined $res; push @no, $orig; } } elsif (m!\A(?:nntps?|s?news)://!i) { @@ -478,7 +481,7 @@ EOM # using `$res' instead of `$orig' EOM } else { - $lei->err($res) if defined $res; + warn($res, "\n") if defined $res; push @no, $orig; } } else {