diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-02-20 16:55:18 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-02-20 16:55:18 +0100 |
commit | 0624476aa19a63b1f4e35f35e151c3fc46cb697f (patch) | |
tree | 67e9ead3bfd44e7efe3f4a6d1325866075dbd702 /lib/private/files | |
parent | f33d35cd073addb08c78a65b719c72eb5424434a (diff) | |
parent | ec45a3c0e2567c89729bc6fe8c996b7939025429 (diff) | |
download | nextcloud-server-0624476aa19a63b1f4e35f35e151c3fc46cb697f.tar.gz nextcloud-server-0624476aa19a63b1f4e35f35e151c3fc46cb697f.zip |
Merge branch 'master' into mimeicons-svg
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/filesystem.php | 10 | ||||
-rw-r--r-- | lib/private/files/storage/wrapper/quota.php | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index b6102f5c245..952f9f9febf 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -320,16 +320,16 @@ class Filesystem { else { self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user); } - $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data"); + $mount_file = \OC_Config::getValue("mount_file", \OC::$SERVERROOT . "/data/mount.json"); //move config file to it's new position if (is_file(\OC::$SERVERROOT . '/config/mount.json')) { - rename(\OC::$SERVERROOT . '/config/mount.json', $datadir . '/mount.json'); + rename(\OC::$SERVERROOT . '/config/mount.json', $mount_file); } // Load system mount points - if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($datadir . '/mount.json')) { - if (is_file($datadir . '/mount.json')) { - $mountConfig = json_decode(file_get_contents($datadir . '/mount.json'), true); + if (is_file(\OC::$SERVERROOT . '/config/mount.php') or is_file($mount_file)) { + if (is_file($mount_file)) { + $mountConfig = json_decode(file_get_contents($mount_file), true); } elseif (is_file(\OC::$SERVERROOT . '/config/mount.php')) { $mountConfig = $parser->parsePHP(file_get_contents(\OC::$SERVERROOT . '/config/mount.php')); } diff --git a/lib/private/files/storage/wrapper/quota.php b/lib/private/files/storage/wrapper/quota.php index 1bcdca7f47a..26c952e694a 100644 --- a/lib/private/files/storage/wrapper/quota.php +++ b/lib/private/files/storage/wrapper/quota.php @@ -16,11 +16,17 @@ class Quota extends Wrapper { protected $quota; /** + * @var string $sizeRoot + */ + protected $sizeRoot; + + /** * @param array $parameters */ public function __construct($parameters) { $this->storage = $parameters['storage']; $this->quota = $parameters['quota']; + $this->sizeRoot = isset($parameters['root']) ? $parameters['root'] : ''; } /** @@ -46,7 +52,7 @@ class Quota extends Wrapper { if ($this->quota < 0) { return $this->storage->free_space($path); } else { - $used = $this->getSize(''); + $used = $this->getSize($this->sizeRoot); if ($used < 0) { return \OC\Files\SPACE_NOT_COMPUTED; } else { |