Fix regexp Supervisor

Former-commit-id: 7dc32dd119ae78a3158e7c5d20bc5f73a8c94d2f
This commit is contained in:
fbsanchez 2019-02-21 14:16:17 +01:00
parent c12ba3b12e
commit fd77b94f96
1 changed files with 2 additions and 2 deletions

View File

@ -693,7 +693,7 @@ class ConsoleSupervisor
while (false !== ($file = readdir($dir)) && $nitems <= $max_files) {
if ($file != '.' && $file != '..') {
if (empty($regex) === false) {
if (preg_match($regex, $file) !== 1) {
if (preg_match($regex, $file) === 1) {
$nitems++;
continue;
}
@ -891,7 +891,7 @@ class ConsoleSupervisor
$filecount = $this->countFiles(
$config['remote_config'],
'/.*BADXML/',
'/^.*BADXML$/',
$MAX_BADXML_FILES_DATA_IN
);
// If cannot open directory, count is '-1', skip.