From 346cec9e29d8c3c0103167c4d32ad2618c198080 Mon Sep 17 00:00:00 2001 From: Bernd Hoehl Date: Mon, 24 Apr 2017 11:46:52 +0200 Subject: [PATCH] fnmatch bugfix when used on Windows --- src/Instrument/FileSystem/Enumerator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Instrument/FileSystem/Enumerator.php b/src/Instrument/FileSystem/Enumerator.php index caad94da..f206d5ae 100644 --- a/src/Instrument/FileSystem/Enumerator.php +++ b/src/Instrument/FileSystem/Enumerator.php @@ -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; } @@ -108,7 +108,7 @@ public function getFilter() } foreach ($excludePaths as $excludePattern) { - if (fnmatch("{$excludePattern}*", $fullPath)) { + if (fnmatch("{$excludePattern}*", $fullPath, FNM_NOESCAPE)) { return false; } }