Overriding the files array, so it will not try to perform actions on files that no longer exists.

This commit is contained in:
Renan Gonçalves 2011-09-01 19:31:32 +02:00
parent 4d1f41dddc
commit edbe60e965

View file

@ -592,7 +592,7 @@ class UpgradeShell extends Shell {
if (!is_dir($path)) {
continue;
}
$files = array();
$this->_files = array();
$Iterator = new RegexIterator(
new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)),
'/^.+\.(' . $extensions . ')$/i',
@ -600,10 +600,9 @@ class UpgradeShell extends Shell {
);
foreach ($Iterator as $file) {
if ($file->isFile()) {
$files[] = $file->getPathname();
$this->_files[] = $file->getPathname();
}
}
$this->_files = array_merge($this->_files, $files);
}
}