diff options
author | Eric Wong <e@80x24.org> | 2023-12-29 18:05:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-12-30 06:44:02 +0000 |
commit | 5aab49f319679cf7912f1abf4914272e5112e247 (patch) | |
tree | feb93cd9b7062e61dd547b96fce91b5231bade88 /lib/PublicInbox/LeiToMail.pm | |
parent | cf977e706b07e80f394570a393eb2169b9b9a1a7 (diff) | |
download | public-inbox-5aab49f319679cf7912f1abf4914272e5112e247.tar.gz |
The MH format is widely-supported and used by various MUAs such as mutt and sylpheed, and a MH-like format is used by mlmmj for archives, as well. Locking implementations for writes are inconsistent, so this commit doesn't support writes, yet. inotify|EVFILT_VNODE watches aren't supported, yet, but that'll have to come since MH allows packing unused integers and renaming files.
Diffstat (limited to 'lib/PublicInbox/LeiToMail.pm')
-rw-r--r-- | lib/PublicInbox/LeiToMail.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiToMail.pm b/lib/PublicInbox/LeiToMail.pm index 071ba113..de75e99e 100644 --- a/lib/PublicInbox/LeiToMail.pm +++ b/lib/PublicInbox/LeiToMail.pm @@ -400,6 +400,11 @@ sub new { "$dst exists and is not a directory\n"; $lei->{ovv}->{dst} = $dst .= '/' if substr($dst, -1) ne '/'; $lei->{opt}->{save} //= \1 if $lei->{cmd} eq 'q'; + } elsif ($fmt eq 'mh') { + -e $dst && !-d _ and die + "$dst exists and is not a directory\n"; + $lei->{ovv}->{dst} = $dst .= '/' if substr($dst, -1) ne '/'; + $lei->{opt}->{save} //= \1 if $lei->{cmd} eq 'q'; } elsif (substr($fmt, 0, 4) eq 'mbox') { require PublicInbox::MboxReader; $self->can("eml2$fmt") or die "bad mbox format: $fmt\n"; |