We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd22d61 commit f28365bCopy full SHA for f28365b
src/Find_Command.php
@@ -244,8 +244,8 @@ private function recurse_directory( $path ) {
244
return;
245
}
246
foreach ( $this->ignored_paths as $ignored_path ) {
247
- // Match at directory boundaries: either at the start or after a directory separator
248
- if ( 0 === stripos( $compared_path, $ignored_path ) || false !== stripos( $compared_path, '/' . $ignored_path ) ) {
+ // Match at directory boundaries using regex to ensure we match complete directory names
+ if ( preg_match( '#(^|/)' . preg_quote( $ignored_path, '#' ) . '#i', $compared_path ) ) {
249
$this->log( "Matched ignored path. Skipping recursion into '{$path}'" );
250
251
0 commit comments