about summary refs log tree commit homepage
path: root/lib/PublicInbox/Gcf2.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/Gcf2.pm')
-rw-r--r--lib/PublicInbox/Gcf2.pm3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/Gcf2.pm b/lib/PublicInbox/Gcf2.pm
index 5490049d..e0219b55 100644
--- a/lib/PublicInbox/Gcf2.pm
+++ b/lib/PublicInbox/Gcf2.pm
@@ -81,8 +81,7 @@ sub add_alt ($$) {
         #
         # See https://bugs.debian.org/975607
         if (open(my $fh, '<', "$objdir/info/alternates")) {
-                chomp(my @abs_alt = grep(m!^/!, <$fh>));
-                $fh = eof($fh) | close $fh; # detect readline errors
+                chomp(my @abs_alt = grep m!^/!, PublicInbox::IO::read_all $fh);
                 $gcf2->add_alternate($_) for @abs_alt;
         }
         $gcf2->add_alternate($objdir);