[VD:LoacalFileSystem] fix Fatal error: Uncaught exception

Fatal error: Uncaught exception 'UnexpectedValueException' at
DirectoryIterator::__construct()
This commit is contained in:
nao-pon
2015-07-09 15:26:42 +09:00
parent 1f78b6081e
commit 5c55fb0f25
+5 -1
View File
@@ -492,8 +492,12 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
$files = array();
$cache = array();
$statOwner = (!empty($this->options['statOwner']));
$dirItr = array();
try {
$dirItr = new DirectoryIterator($path);
} catch (UnexpectedValueException $e) {}
foreach (new DirectoryIterator($path) as $file) {
foreach ($dirItr as $file) {
if ($file->isDot()) { continue; }
$files[] = $fpath = $this->_joinPath($path, $file->getFilename());