From e3b920c4fdf4fb981306cc3fc832bdd367ccc922 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 28 May 2021 22:37:21 +0000 Subject: lei q|up: support v2:/path/to/inboxdir destination This allows "lei-managed pseudo mailing lists" as described by Konstantin. Alternates use is optional and can be enables via --shared. This doesn't manage or edit ~/.public-inbox/config; presumably there'll need to be some tweaking of search parameters before finalizing and making the inbox publicly accessible via HTTP/NNTP. Link: https://public-inbox.org/meta/20210426164454.5zd5kgugfhfwfkpo@nitro.local/T/ --- lib/PublicInbox/LeiSavedSearch.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/LeiSavedSearch.pm') diff --git a/lib/PublicInbox/LeiSavedSearch.pm b/lib/PublicInbox/LeiSavedSearch.pm index 48d252f1..929380ed 100644 --- a/lib/PublicInbox/LeiSavedSearch.pm +++ b/lib/PublicInbox/LeiSavedSearch.pm @@ -14,7 +14,7 @@ use PublicInbox::Spawn qw(run_die); use PublicInbox::ContentHash qw(git_sha); use PublicInbox::MID qw(mids_for_index); use Digest::SHA qw(sha256_hex); -my $LOCAL_PFX = qr!\A(?:maildir|mh|mbox.+|mmdf):!i; # TODO: put in LeiToMail? +my $LOCAL_PFX = qr!\A(?:maildir|mh|mbox.+|mmdf|v2):!i; # TODO: put in LeiToMail? # move this to PublicInbox::Config if other things use it: my %cquote = ("\n" => '\\n', "\t" => '\\t', "\b" => '\\b'); @@ -290,6 +290,12 @@ EOM my $dir_old = lss_dir_for($lei, \$old_path, 1); my $dir_new = lss_dir_for($lei, \$new_path); return if $dir_new eq $dir_old; # no change, likely + + ($old_out =~ m!\Av2:!i || $new_out =~ m!\Av2:!) and + return $lei->fail(<fail(<