setup mount manager before wrappers
This commit is contained in:
parent
3cb53b7756
commit
f585994c4b
|
@ -349,7 +349,7 @@ class Filesystem {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function initMounts() {
|
static public function initMountManager() {
|
||||||
if (!self::$mounts) {
|
if (!self::$mounts) {
|
||||||
self::$mounts = new Mount\Manager();
|
self::$mounts = new Mount\Manager();
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ class OC_Util {
|
||||||
// mount local file backend as root
|
// mount local file backend as root
|
||||||
$configDataDirectory = OC_Config::getValue("datadirectory", OC::$SERVERROOT . "/data");
|
$configDataDirectory = OC_Config::getValue("datadirectory", OC::$SERVERROOT . "/data");
|
||||||
//first set up the local "root" storage
|
//first set up the local "root" storage
|
||||||
\OC\Files\Filesystem::initMounts();
|
\OC\Files\Filesystem::initMountManager();
|
||||||
if (!self::$rootMounted) {
|
if (!self::$rootMounted) {
|
||||||
\OC\Files\Filesystem::mount('\OC\Files\Storage\Local', array('datadir' => $configDataDirectory), '/');
|
\OC\Files\Filesystem::mount('\OC\Files\Storage\Local', array('datadir' => $configDataDirectory), '/');
|
||||||
self::$rootMounted = true;
|
self::$rootMounted = true;
|
||||||
|
@ -96,7 +96,7 @@ class OC_Util {
|
||||||
$config['class'] = '\OC\Files\ObjectStore\ObjectStoreStorage';
|
$config['class'] = '\OC\Files\ObjectStore\ObjectStoreStorage';
|
||||||
|
|
||||||
// mount object storage as root
|
// mount object storage as root
|
||||||
\OC\Files\Filesystem::initMounts();
|
\OC\Files\Filesystem::initMountManager();
|
||||||
if (!self::$rootMounted) {
|
if (!self::$rootMounted) {
|
||||||
\OC\Files\Filesystem::mount($config['class'], $config['arguments'], '/');
|
\OC\Files\Filesystem::mount($config['class'], $config['arguments'], '/');
|
||||||
self::$rootMounted = true;
|
self::$rootMounted = true;
|
||||||
|
@ -133,6 +133,8 @@ class OC_Util {
|
||||||
self::$fsSetup = true;
|
self::$fsSetup = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\OC\Files\Filesystem::initMountManager();
|
||||||
|
|
||||||
\OC\Files\Filesystem::addStorageWrapper('mount_options', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
|
\OC\Files\Filesystem::addStorageWrapper('mount_options', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
|
||||||
if ($storage->instanceOfStorage('\OC\Files\Storage\Common')) {
|
if ($storage->instanceOfStorage('\OC\Files\Storage\Common')) {
|
||||||
/** @var \OC\Files\Storage\Common $storage */
|
/** @var \OC\Files\Storage\Common $storage */
|
||||||
|
|
Loading…
Reference in New Issue