]> source.dussan.org Git - nextcloud-server.git/commitdiff
Delay files_sharing's registerMountProviders
authorVincent Petry <pvince81@owncloud.com>
Fri, 17 Jun 2016 09:00:09 +0000 (11:00 +0200)
committerVincent Petry <pvince81@owncloud.com>
Fri, 17 Jun 2016 09:00:09 +0000 (11:00 +0200)
This moves registerMountProviders until after the sharing backends were
registered. In some situations registerMountProviders will trigger
listeners which might require filesystem access which itself would
mount shares, which itself requires the sharing backends to be
initialized.

apps/files_sharing/appinfo/app.php

index 5740574ec4cfc5b09526bca5295fb66013326f6e..c6ae6903eec2c75e506f96b13d310e24bf619ecb 100644 (file)
@@ -32,14 +32,14 @@ $l = \OC::$server->getL10N('files_sharing');
 \OC::$CLASSPATH['OC_Share_Backend_Folder'] = 'files_sharing/lib/share/folder.php';
 \OC::$CLASSPATH['OC\Files\Storage\Shared'] = 'files_sharing/lib/sharedstorage.php';
 
-$application = new \OCA\Files_Sharing\AppInfo\Application();
-$application->registerMountProviders();
-
 \OCA\Files_Sharing\Helper::registerHooks();
 
 \OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
 \OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
 
+$application = new \OCA\Files_Sharing\AppInfo\Application();
+$application->registerMountProviders();
+
 $eventDispatcher = \OC::$server->getEventDispatcher();
 $eventDispatcher->addListener(
        'OCA\Files::loadAdditionalScripts',