fixed paths/notPaths regex for shell adapters
This commit is contained in:
parent
32c5bf7b91
commit
83a61cfb2b
@ -210,7 +210,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter
|
||||
// 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('*');
|
||||
}
|
||||
@ -221,7 +221,7 @@ abstract class AbstractFindAdapter extends AbstractAdapter
|
||||
? ($expr->isCaseSensitive() ? '-regex' : '-iregex')
|
||||
: ($expr->isCaseSensitive() ? '-path' : '-ipath')
|
||||
)
|
||||
->arg($expr->prepend($dir.DIRECTORY_SEPARATOR)->renderPattern());
|
||||
->arg($expr->renderPattern());
|
||||
}
|
||||
|
||||
$command->cmd(')');
|
||||
|
Reference in New Issue
Block a user