Fix yii\helpers\FileHelper::copyDirectory() pattern not working

This commit is contained in:
Klimov Paul
2014-05-30 14:50:11 +03:00
parent 243f0134c9
commit f19a97e308
3 changed files with 42 additions and 0 deletions

View File

@@ -209,6 +209,9 @@ class BaseFileHelper
if ($handle === false) {
throw new InvalidParamException('Unable to open directory: ' . $src);
}
if (!isset($options['basePath'])) {
$options['basePath'] = realpath($src);
}
while (($file = readdir($handle)) !== false) {
if ($file === '.' || $file === '..') {
continue;