diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-04-25 14:36:53 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-04-25 14:36:53 +0200 |
commit | 21643150aa2871d36e70de6188d8fa45957f4743 (patch) | |
tree | 266227bd1ac22dcef2846305a8201b80e692079c /lib/private/Files/Storage | |
parent | 7a22e3f083af7a7c64a022af6e6e5aa9e478cc6a (diff) | |
download | nextcloud-server-21643150aa2871d36e70de6188d8fa45957f4743.tar.gz nextcloud-server-21643150aa2871d36e70de6188d8fa45957f4743.zip |
error out if a local storage isn't setup correctly
Diffstat (limited to 'lib/private/Files/Storage')
-rw-r--r-- | lib/private/Files/Storage/Local.php | 3 |
1 files changed, 3 insertions, 0 deletions
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 .= '/'; |