File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
tests/gendiffcov/insensitive Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ OUTER: while ($dir &&
33
33
34
34
if (opendir (my $d , $dir )) {
35
35
foreach my $name (readdir ($d )) {
36
- if ($name =~ / $f /i ) {
36
+ if ($name =~ / ^ $f $ /i ) {
37
37
push (@stack , $name );
38
38
last OUTER;
39
39
}
@@ -46,7 +46,7 @@ while (1 < scalar(@stack)) {
46
46
my $f = pop (@stack );
47
47
opendir (my $d , $path ) or die (" cannot read dir $path " );
48
48
foreach my $name (readdir ($d )) {
49
- if ($name =~ / $f /i ) {
49
+ if ($name =~ / ^ $f $ /i ) {
50
50
$path = File::Spec-> catdir($path , $name );
51
51
last ;
52
52
}
@@ -61,9 +61,9 @@ $f = pop(@stack)
61
61
my $annotated = File::Spec-> catfile($path , $f . " .annotated" );
62
62
opendir my $d , $path or die (" cannot read $path " );
63
63
foreach my $name (readdir ($d )) {
64
- if ($name =~ / $f \. annotated/i ) {
64
+ if ($name =~ / ^ $f \. annotated$ /i ) {
65
65
$annotated = File::Spec-> catfile($path , $name );
66
- } elsif ($name =~ / $f /i ) { # case insensitive match
66
+ } elsif ($name =~ / ^ $f $ /i ) { # case insensitive match
67
67
$file = File::Spec-> catfile($path , $name );
68
68
}
69
69
}
You can’t perform that action at this time.
0 commit comments