diff options
author | Eric Wong <e@80x24.org> | 2021-05-28 22:37:21 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-05-28 22:38:43 +0000 |
commit | e3b920c4fdf4fb981306cc3fc832bdd367ccc922 (patch) | |
tree | 2ed199def390bd48faa48f0e073ae08b473ebe74 /lib/PublicInbox/LeiSavedSearch.pm | |
parent | 5944277a4dc986f9adf9ba69a1e6e44899ad98c1 (diff) | |
download | public-inbox-e3b920c4fdf4fb981306cc3fc832bdd367ccc922.tar.gz |
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/
Diffstat (limited to 'lib/PublicInbox/LeiSavedSearch.pm')
-rw-r--r-- | lib/PublicInbox/LeiSavedSearch.pm | 8 |
1 files changed, 7 insertions, 1 deletions
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(<<EOM); +conversions from/to v2 inboxes not supported at this time +EOM + return $lei->fail(<<EOM) if -e $dir_new; lei.q.output changed from `$old_out' to `$new_out' However, $dir_new exists |