error out if a local storage isn't setup correctly
This commit is contained in:
parent
7a22e3f083
commit
21643150aa
|
@ -39,6 +39,9 @@ class Local extends \OC\Files\Storage\Common {
|
||||||
protected $datadir;
|
protected $datadir;
|
||||||
|
|
||||||
public function __construct($arguments) {
|
public function __construct($arguments) {
|
||||||
|
if (!isset($arguments['datadir']) || !is_string($arguments['datadir'])) {
|
||||||
|
throw new \InvalidArgumentException('No data directory set for local storage');
|
||||||
|
}
|
||||||
$this->datadir = $arguments['datadir'];
|
$this->datadir = $arguments['datadir'];
|
||||||
if (substr($this->datadir, -1) !== '/') {
|
if (substr($this->datadir, -1) !== '/') {
|
||||||
$this->datadir .= '/';
|
$this->datadir .= '/';
|
||||||
|
|
Loading…
Reference in New Issue