]> source.dussan.org Git - nextcloud-server.git/commitdiff
setup mount manager before wrappers
authorRobin Appelman <icewind@owncloud.com>
Thu, 2 Apr 2015 11:28:36 +0000 (13:28 +0200)
committerRobin Appelman <icewind@owncloud.com>
Thu, 2 Apr 2015 11:28:36 +0000 (13:28 +0200)
lib/private/files/filesystem.php
lib/private/util.php

index eef76125311e14ebf5b3a95f55a60f29361f04e8..95e630b77655a12c6c37f3232a0a06ec5da19574 100644 (file)
@@ -349,7 +349,7 @@ class Filesystem {
                return true;
        }
 
-       static public function initMounts() {
+       static public function initMountManager() {
                if (!self::$mounts) {
                        self::$mounts = new Mount\Manager();
                }
index 9e70e3ca35f8c5e7dbbfe6894461d9e4ede84691..e6dd307faea8bbbd2e9e1cbe2479c59fbd68fcd1 100644 (file)
@@ -67,7 +67,7 @@ class OC_Util {
                // mount local file backend as root
                $configDataDirectory = OC_Config::getValue("datadirectory", OC::$SERVERROOT . "/data");
                //first set up the local "root" storage
-               \OC\Files\Filesystem::initMounts();
+               \OC\Files\Filesystem::initMountManager();
                if (!self::$rootMounted) {
                        \OC\Files\Filesystem::mount('\OC\Files\Storage\Local', array('datadir' => $configDataDirectory), '/');
                        self::$rootMounted = true;
@@ -96,7 +96,7 @@ class OC_Util {
                $config['class'] = '\OC\Files\ObjectStore\ObjectStoreStorage';
 
                // mount object storage as root
-               \OC\Files\Filesystem::initMounts();
+               \OC\Files\Filesystem::initMountManager();
                if (!self::$rootMounted) {
                        \OC\Files\Filesystem::mount($config['class'], $config['arguments'], '/');
                        self::$rootMounted = true;
@@ -133,6 +133,8 @@ class OC_Util {
                        self::$fsSetup = true;
                }
 
+               \OC\Files\Filesystem::initMountManager();
+
                \OC\Files\Filesystem::addStorageWrapper('mount_options', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
                        if ($storage->instanceOfStorage('\OC\Files\Storage\Common')) {
                                /** @var \OC\Files\Storage\Common $storage */