From 41c3eed65eb03256b0916cfdbf43723e070a633a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Sep 2021 17:51:57 -0500 Subject: net_reader: NNTP: remove article numbers from mail_sync folders NNTP article numbers are stored separately from folder names in mail_sync.sqlite3. Recovering from this is optional, worse case is wasting bandwidth refetching some messages. To (optionally) recover from this, use: lei forget-mail-sync $URL_WITH_ARTNUMS Some articles will be refetched on the next import, but duplicate data won't be indexed in Xapian. --- lib/PublicInbox/NetReader.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/NetReader.pm') diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm index fbe1ac4f..eab7320e 100644 --- a/lib/PublicInbox/NetReader.pm +++ b/lib/PublicInbox/NetReader.pm @@ -729,7 +729,10 @@ sub _nntp_fetch_all ($$$) { } (defined($num_a) && defined($num_b) && $num_a > $num_b) and return "E: $uri: backwards range: $num_a > $num_b"; - + if (defined($num_a)) { # no article numbers in mail_sync.sqlite3 + $uri = $uri->clone; + $uri->group($group); + } # IMAPTracker is also used for tracking NNTP, UID == article number # LIST.ACTIVE can get the equivalent of UIDVALIDITY, but that's # expensive. So we assume newsgroups don't change: -- cgit v1.2.3-24-ge0c7