From 21643150aa2871d36e70de6188d8fa45957f4743 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 25 Apr 2016 14:36:53 +0200 Subject: error out if a local storage isn't setup correctly --- lib/private/Files/Storage/Local.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/private') diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 25b202af5f8..03aaf1e0a8b 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -39,6 +39,9 @@ class Local extends \OC\Files\Storage\Common { protected $datadir; 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']; if (substr($this->datadir, -1) !== '/') { $this->datadir .= '/'; -- cgit v1.2.3