From 2c472f1f571ae55155c78bcbc4d420d06266ba63 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Nov 2023 09:21:43 +0000 Subject: lei convert: fix repeat and idempotent v2 output We should be able to treat v2 outputs just like any other mail format, with the exception that content dedupe is always enforced by the v2 format. This allows users hosting v2 public-inboxes to catch up broken synchronization from alternate archives such as the mbox archives hosted by https://lists.gnu.org/ Link: https://public-inbox.org/meta/20231114-hypersonic-papaya-starling-e1cfc8@nitro/ --- lib/PublicInbox/LeiOverview.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/LeiOverview.pm') diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm index 129dabf8..0529bbe4 100644 --- a/lib/PublicInbox/LeiOverview.pm +++ b/lib/PublicInbox/LeiOverview.pm @@ -41,8 +41,8 @@ sub detect_fmt ($) { my ($dst) = @_; if ($dst =~ m!\A([:/]+://)!) { die "$1 support not implemented, yet\n"; - } elsif (!-e $dst || -d _) { - 'maildir'; # the default TODO: MH? + } elsif (!-e $dst || -d _) { # maildir is the default TODO: MH + -e "$dst/inbox.lock" ? 'v2' : 'maildir'; } elsif (-f _ || -p _) { die "unable to determine mbox family of $dst\n"; } else { -- cgit v1.2.3-24-ge0c7