Skip to content

Commit

Permalink
fnmatch bugfix when used on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Hoehl authored and lisachenko committed Apr 25, 2017
1 parent 4cecad3 commit 346cec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Instrument/FileSystem/Enumerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function getFilter()
if (!empty($includePaths)) {
$found = false;
foreach ($includePaths as $includePattern) {
if (fnmatch("{$includePattern}*", $fullPath)) {
if (fnmatch("{$includePattern}*", $fullPath, FNM_NOESCAPE)) {
$found = true;
break;
}
Expand All @@ -108,7 +108,7 @@ public function getFilter()
}

foreach ($excludePaths as $excludePattern) {
if (fnmatch("{$excludePattern}*", $fullPath)) {
if (fnmatch("{$excludePattern}*", $fullPath, FNM_NOESCAPE)) {
return false;
}
}
Expand Down

0 comments on commit 346cec9

Please sign in to comment.