about summary refs log tree commit homepage
path: root/lib/PublicInbox
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-19 17:51:57 -0500
committerEric Wong <e@80x24.org>2021-09-19 22:52:45 +0000
commit41c3eed65eb03256b0916cfdbf43723e070a633a (patch)
tree9cd607c386a42482b8a707969b238e0cb58eee94 /lib/PublicInbox
parenta1ab37f1c67ad06faf03186361263adf25bc1efe (diff)
downloadpublic-inbox-41c3eed65eb03256b0916cfdbf43723e070a633a.tar.gz
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.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r--lib/PublicInbox/NetReader.pm5
1 files changed, 4 insertions, 1 deletions
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: