mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-29 11:33:33 +01:00
make EXCLUDE_PATHS work across different OSes (#4128)
This commit is contained in:
parent
6e2f798fe2
commit
a03446e139
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user