diff options
author | Eric Wong <e@yhbt.net> | 2020-08-01 08:12:25 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-08-02 08:26:18 +0000 |
commit | 84e006fdb9fb72010d6a0dac15287ff43bd1772c (patch) | |
tree | 2940dcff9f1f75775654a5178e44a626c44fd3c6 /script | |
parent | 9447bac572fccad88f8a1aacf0cd3aceef787182 (diff) | |
download | public-inbox-84e006fdb9fb72010d6a0dac15287ff43bd1772c.tar.gz |
This is more accurate given we use PublicInbox::Eml instead of Email::MIME/PublicInbox::MIME, nowadays.
Diffstat (limited to 'script')
-rwxr-xr-x | script/public-inbox-edit | 9 |
1 files changed, 4 insertions, 5 deletions
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); |