]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Search.pm
support multiple CODE_URLs
[public-inbox.git] / lib / PublicInbox / Search.pm
index 803914b02f596d45b6d03087180b4afb14f3f9b3..b1d38fb901b2f0fcce07513bd559be71b812fa60 100644 (file)
@@ -197,8 +197,7 @@ sub xdb_sharded {
 
        # We need numeric sorting so shard[0] is first for reading
        # Xapian metadata, if needed
-       my $last = max(grep(/\A[0-9]+\z/, readdir($dh)));
-       return if !defined($last);
+       my $last = max(grep(/\A[0-9]+\z/, readdir($dh))) // return;
        my (@xdb, $slow_phrase);
        for (0..$last) {
                my $shard_dir = "$self->{xpfx}/$_";