Skip to content

Commit e32aab1

Browse files
GabrielLoberpar
authored andcommitted
lcov: Fix --remove pattern matching
The --remove option of lcov now consider the pattern passed as parameter as a full path, and not only a part of the filename. This behavior was discovered by using AX_CODE_COVERAGE[1] m4 macro from a directory in $HOME/tmp. The macro itself calls lcov with `--remove "/tmp/*"`. [1]: https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html Signed-off-by: Gabriel Laskar <[email protected]>
1 parent 79e9f28 commit e32aab1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/lcov

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2915,7 +2915,7 @@ sub remove()
29152915

29162916
foreach $pattern (@pattern_list)
29172917
{
2918-
$match_found ||= ($filename =~ (/$pattern$/));
2918+
$match_found ||= ($filename =~ (/^$pattern$/));
29192919
}
29202920

29212921

0 commit comments

Comments
 (0)