Avoids issues if build directory's pathname contains regex
metacharacters.
Raúl Marín Rodríguez
Discussion: https://postgr.es/m/CAM6_UM6dGdU39PKAC24T+HD9ouy0jLN9vH6163K8QEEzr__iZw@mail.gmail.com
my ($prefix, $nb, $min, $max, $re) = @_;
- my @logs = glob "$prefix.*";
+ my $qprefix = quotemeta($prefix);
+ my @logs = glob "$qprefix.*";
ok(@logs == $nb, "number of log files");
- ok(grep(/^$prefix\.\d+(\.\d+)?$/, @logs) == $nb, "file name format");
+ ok(grep(/^$qprefix\.\d+(\.\d+)?$/, @logs) == $nb, "file name format");
my $log_number = 0;
for my $log (sort @logs)