about summary refs log tree commit homepage
path: root/lib/PublicInbox/NetReader.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-10-03 06:43:50 +0000
committerEric Wong <e@80x24.org>2023-10-03 10:16:08 +0000
commit8dc0811343ca1d524e46bd30d3c11dcd728fe911 (patch)
tree76c768b5ae05395927d6df28a19c07abeba50cfb /lib/PublicInbox/NetReader.pm
parented646e22f30102c89fa481aa0d64629e4ccb33ac (diff)
downloadpublic-inbox-8dc0811343ca1d524e46bd30d3c11dcd728fe911.tar.gz
This matches the IMAP behavior with UIDs.  While we're in the
area, cut down on LoC a bit and reduce the scope of the $art
variable.
Diffstat (limited to 'lib/PublicInbox/NetReader.pm')
-rw-r--r--lib/PublicInbox/NetReader.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/PublicInbox/NetReader.pm b/lib/PublicInbox/NetReader.pm
index 2d6cb0d6..76fd3892 100644
--- a/lib/PublicInbox/NetReader.pm
+++ b/lib/PublicInbox/NetReader.pm
@@ -788,14 +788,12 @@ sub _nntp_fetch_all ($$$) {
         $beg = $num_a if defined($num_a) && $num_a > $beg && $num_a <= $end;
         $end = $num_b if defined($num_b) && $num_b >= $beg && $num_b < $end;
         $end = $beg if defined($num_a) && !defined($num_b);
-        my ($err, $art, $last_art, $kw); # kw stays undef, no keywords in NNTP
-        unless ($self->{quiet}) {
-                warn "# $uri fetching ARTICLE $beg..$end\n";
-        }
+        my ($err, $last_art, $kw); # kw stays undef, no keywords in NNTP
+        warn "# $uri fetching ARTICLE $beg..$end\n" if !$self->{quiet};
         my $n = $self->{max_batch};
-        for ($beg..$end) {
+        for my $art ($beg..$end) {
                 last if $self->{quit};
-                $art = $_;
+                local $0 = "#$art $group $sec";
                 if (--$n < 0) {
                         run_commit_cb($self);
                         $itrk->update_last(0, $last_art) if $itrk;