about summary refs log tree commit homepage
path: root/lib/PublicInbox/Inbox.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-06-04 08:40:34 +0000
committerEric Wong <e@80x24.org>2019-06-04 10:06:18 +0000
commitd3906fed88f403552d1629e9ecc9974ab85abaae (patch)
tree44eece4dff4ac1e7e91566400c32ddb024682ca8 /lib/PublicInbox/Inbox.pm
parentb04bdc8cd749dd3dfcc9351b2b47bfdf190b4a3a (diff)
downloadpublic-inbox-d3906fed88f403552d1629e9ecc9974ab85abaae.tar.gz
In case some BOFH decides to randomly create directories
using non-ASCII digits all over the place.
Diffstat (limited to 'lib/PublicInbox/Inbox.pm')
-rw-r--r--lib/PublicInbox/Inbox.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Inbox.pm b/lib/PublicInbox/Inbox.pm
index 04d2f832..c9330332 100644
--- a/lib/PublicInbox/Inbox.pm
+++ b/lib/PublicInbox/Inbox.pm
@@ -87,7 +87,7 @@ sub _set_limiter ($$$) {
                 my $mkey = $pfx.'max';
                 my $val = $self->{$mkey} or return;
                 my $lim;
-                if ($val =~ /\A\d+\z/) {
+                if ($val =~ /\A[0-9]+\z/) {
                         require PublicInbox::Qspawn;
                         $lim = PublicInbox::Qspawn::Limiter->new($val);
                 } elsif ($val =~ /\A[a-z][a-z0-9]*\z/) {
@@ -161,7 +161,7 @@ sub max_git_part {
                 if (opendir my $dh, $gits) {
                         my $max = -1;
                         while (defined(my $git_dir = readdir($dh))) {
-                                $git_dir =~ m!\A(\d+)\.git\z! or next;
+                                $git_dir =~ m!\A([0-9]+)\.git\z! or next;
                                 $max = $1 if $1 > $max;
                         }
                         $part = $self->{-max_git_part} = $max if $max >= 0;