From 84e006fdb9fb72010d6a0dac15287ff43bd1772c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 1 Aug 2020 08:12:25 +0000 Subject: inboxwritable: rename mime_from_path to eml_from_path This is more accurate given we use PublicInbox::Eml instead of Email::MIME/PublicInbox::MIME, nowadays. --- script/public-inbox-edit | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'script') diff --git a/script/public-inbox-edit b/script/public-inbox-edit index d8e511b2..2d3c4af4 100755 --- a/script/public-inbox-edit +++ b/script/public-inbox-edit @@ -13,7 +13,7 @@ use PublicInbox::ContentHash qw(content_hash); use PublicInbox::MID qw(mid_clean mids); PublicInbox::Admin::check_require('-index'); use PublicInbox::Eml; -use PublicInbox::InboxWritable; +use PublicInbox::InboxWritable qw(eml_from_path); use PublicInbox::Import; my $usage = "$0 -m MESSAGE_ID [--all] [INBOX_DIRS]"; @@ -92,11 +92,10 @@ Multiple messages with different content found matching warn "Will edit all of them\n"; } } else { - my $mime = PublicInbox::InboxWritable::mime_from_path($file) or - die "open($file) failed: $!"; - my $mids = mids($mime->header_obj); + my $eml = eml_from_path($file) or die "open($file) failed: $!"; + my $mids = mids($eml->header_obj); find_mid($found, $_, \@ibxs) for (@$mids); # populates $found - my $chash = content_hash($mime); + my $chash = content_hash($eml); my $to_edit = $found->{$chash}; unless ($to_edit) { my $nr = scalar(keys %$found); -- cgit v1.2.3-24-ge0c7