From 0d00fb2ee87d714ede9f8937dde9bae8d778804d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 1 May 2021 19:29:05 +0000 Subject: lei import: fix --mail-sync handling in LeiInput "lei inspect" also shows "mail-sync" as a field name --- lib/PublicInbox/LeiInput.pm | 8 ++++---- lib/PublicInbox/LeiInspect.pm | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm index 86f300c3..9bcc86e1 100644 --- a/lib/PublicInbox/LeiInput.pm +++ b/lib/PublicInbox/LeiInput.pm @@ -204,7 +204,7 @@ sub prepare_http_input ($$$) { sub prepare_inputs { # returns undef on error my ($self, $lei, $inputs) = @_; my $in_fmt = $lei->{opt}->{'in-format'}; - my $sync = $lei->{opt}->{sync} ? {} : undef; # using LeiMailSync + my $sync = $lei->{opt}->{'mail-sync'} ? {} : undef; # using LeiMailSync if ($lei->{opt}->{stdin}) { @$inputs and return $lei->fail("--stdin and @$inputs do not mix"); @@ -286,11 +286,11 @@ $input is `eml', not --in-format=$in_fmt } if ($sync && $sync->{no}) { return $lei->fail(<<"") if !$sync->{ok}; ---sync specified but no inputs support it +--mail-sync specified but no inputs support it # non-fatal if some inputs support support sync - $lei->err("# --sync will only be used for @{$sync->{ok}}"); - $lei->err("# --sync is not supported for: @{$sync->{no}}"); + $lei->err("# --mail-sync will only be used for @{$sync->{ok}}"); + $lei->err("# --mail-sync is not supported for: @{$sync->{no}}"); } if ($net) { $net->{-can_die} = 1; diff --git a/lib/PublicInbox/LeiInspect.pm b/lib/PublicInbox/LeiInspect.pm index 6cfc8083..714d2526 100644 --- a/lib/PublicInbox/LeiInspect.pm +++ b/lib/PublicInbox/LeiInspect.pm @@ -18,7 +18,7 @@ sub inspect_blob ($$) { $ent->{'lei/store'} = \@docids if @docids; my $lms = $lse->lms; if (my $loc = $lms ? $lms->locations_for($oidhex) : undef) { - $ent->{sync} = $loc; + $ent->{'mail-sync'} = $loc; } } $ent; -- cgit v1.2.3-24-ge0c7