optimize of #542 (initalizes $aroot)

This commit is contained in:
nao-pon
2013-04-22 16:21:46 +09:00
parent 165409cc35
commit 3554347475
@@ -24,6 +24,13 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
**/
protected $archiveSize = 0;
/**
* Canonicalized absolute pathname of $root
*
* @var strung
*/
protected $aroot;
/**
* Constructor
* Extend options with required fields
@@ -264,6 +271,10 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
}
//Verifies the given path is the root or is inside the root. Prevents directory traveral.
if (!$this->aroot) {
// for Inheritance class ( not calling parent::configure() )
$this->aroot = realpath($this->root);
}
if (!$this->_inpath(realpath($path), $this->aroot)) {
return $stat;
}