make EXCLUDE_PATHS work across different OSes (#4128)

This commit is contained in:
Markus Staab 2020-09-07 17:55:43 +02:00 committed by GitHub
parent 6e2f798fe2
commit a03446e139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -158,8 +158,14 @@ final class FilesFinder
return false;
}
// make the path work accross different OSes
$realPath = str_replace('\\', '/', $realPath);
// return false to remove file
foreach ($this->excludePaths as $excludePath) {
// make the path work accross different OSes
$excludePath = str_replace('\\', '/', $excludePath);
if (Strings::match($realPath, '#' . preg_quote($excludePath, '#') . '#')) {
return false;
}