diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-10-06 09:25:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 09:25:15 +0200 |
commit | ea9b1cc3409f39c545505bbcddb7a20fda114c0e (patch) | |
tree | fb23c0f7cca1f82daa5519015e57e244b9913d26 /lib/private/legacy | |
parent | ff3e8c21397c79ac1231c4f16a8372908d79b067 (diff) | |
parent | 316db0a97b0212aca2f36b4ee09675bf9809f4dd (diff) | |
download | nextcloud-server-ea9b1cc3409f39c545505bbcddb7a20fda114c0e.tar.gz nextcloud-server-ea9b1cc3409f39c545505bbcddb7a20fda114c0e.zip |
Merge pull request #1306 from nextcloud/simplefs
Introducing AppData
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/util.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index cb52949779f..b8f3a93ba50 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -311,10 +311,20 @@ class OC_Util { * * @param String $userId * @param \OCP\Files\Folder $userDirectory + * @throws \RuntimeException */ public static function copySkeleton($userId, \OCP\Files\Folder $userDirectory) { - $skeletonDirectory = \OCP\Config::getSystemValue('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton'); + $skeletonDirectory = \OC::$server->getConfig()->getSystemValue('skeletondirectory', \OC::$SERVERROOT . '/core/skeleton'); + $instanceId = \OC::$server->getConfig()->getSystemValue('instanceid', ''); + + if ($instanceId === null) { + throw new \RuntimeException('no instance id!'); + } + $appdata = 'appdata_' . $instanceId; + if ($userId === $appdata) { + throw new \RuntimeException('username is reserved name: ' . $appdata); + } if (!empty($skeletonDirectory)) { \OCP\Util::writeLog( |