From e2c7d31107f27735a2db308fe65cb73c6b5215ca Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Wed, 27 Sep 2023 15:36:25 +0100 Subject: [PATCH] Remove DIRECTORY_SEPARATOR replacement --- .../FileLocator/LocateAllFilesByExtension.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php b/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php index 09cf3aa4..2757a132 100644 --- a/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php +++ b/src/ComposerRequireChecker/FileLocator/LocateAllFilesByExtension.php @@ -12,7 +12,6 @@ use function implode; use function preg_match; use function preg_quote; -use function preg_replace; use function str_replace; use function trim; @@ -82,7 +81,6 @@ private function prepareBlacklistPatterns(array|null $blacklistPaths): array $path = str_replace('/', DIRECTORY_SEPARATOR, $path); $path = trim($path, DIRECTORY_SEPARATOR); $path = preg_quote($path, '{}'); - $path = preg_replace('{' . $dirSep . '+}', DIRECTORY_SEPARATOR, $path); $path = str_replace('\\*\\*', '.+?', $path); $path = str_replace('\\*', '[^' . $dirSep . ']+?', $path); }