summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-04-26 20:57:56 +0200
committerLukas Reschke <lukas@owncloud.com>2016-04-26 20:57:56 +0200
commitddbebe91f0ea0c6a938991b929ffdb71bbb2cc16 (patch)
tree330cf91f3cd31e9c925e9ab962953ac902b79d1a /lib/private
parent887045b790ced3473f2c0e955abcdd2bc1944612 (diff)
parent2f01c83a014dc01e87dbb2475c7620daf867d80a (diff)
downloadnextcloud-server-ddbebe91f0ea0c6a938991b929ffdb71bbb2cc16.tar.gz
nextcloud-server-ddbebe91f0ea0c6a938991b929ffdb71bbb2cc16.zip
Merge pull request #24246 from owncloud/local-invalid
error out if a local storage isn't setup correctly
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Local.php3
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 .= '/';