Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed paths/notPaths regex for shell adapters
  • Loading branch information
jfsimon authored and fabpot committed Feb 26, 2013
1 parent 32c5bf7 commit 83a61cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php
Expand Up @@ -210,7 +210,7 @@ private function buildPathsFiltering(Command $command, $dir, array $paths, $not
// Fixes 'not search' regex problems.
if ($expr->isRegex()) {
$regex = $expr->getRegex();
$regex->prepend($regex->hasStartFlag() ? '' : '.*')->setEndJoker(!$regex->hasEndFlag());
$regex->prepend($regex->hasStartFlag() ? $dir.DIRECTORY_SEPARATOR : '.*')->setEndJoker(!$regex->hasEndFlag());
} else {
$expr->prepend('*')->append('*');
}
Expand All @@ -221,7 +221,7 @@ private function buildPathsFiltering(Command $command, $dir, array $paths, $not
? ($expr->isCaseSensitive() ? '-regex' : '-iregex')
: ($expr->isCaseSensitive() ? '-path' : '-ipath')
)
->arg($expr->prepend($dir.DIRECTORY_SEPARATOR)->renderPattern());
->arg($expr->renderPattern());
}

$command->cmd(')');
Expand Down

0 comments on commit 83a61cf

Please sign in to comment.