src build elFinder-2.1-925c483

This commit is contained in:
nao-pon
2016-01-09 16:31:26 +09:00
parent ac28c2339c
commit f6026d24d9
5 changed files with 15 additions and 8 deletions
+9 -2
View File
@@ -548,8 +548,15 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
protected function _subdirs($path) {
if (is_dir($path)) {
$path = strtr($path, array('[' => '\\[', ']' => '\\]', '*' => '\\*', '?' => '\\?'));
return (bool)glob(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);
$dirItr = new ParentIterator(
new RecursiveDirectoryIterator($path,
FilesystemIterator::SKIP_DOTS |
(defined('RecursiveDirectoryIterator::FOLLOW_SYMLINKS')?
RecursiveDirectoryIterator::FOLLOW_SYMLINKS : 0)
)
);
$dirItr->rewind();
return $dirItr->hasChildren();
}
return false;
}