Delay files_sharing's registerMountProviders

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.
This commit is contained in:
Vincent Petry 2016-06-17 11:00:09 +02:00 committed by Lukas Reschke
parent f11e486025
commit dc3db4e1c0
No known key found for this signature in database
GPG Key ID: 9AB0ADB949B6898C
1 changed files with 3 additions and 2 deletions

View File

@ -41,8 +41,6 @@ $l = \OC::$server->getL10N('files_sharing');
\OC::$CLASSPATH['OCA\Files\Share\Maintainer'] = 'files_sharing/lib/maintainer.php';
\OC::$CLASSPATH['OCA\Files\Share\Proxy'] = 'files_sharing/lib/proxy.php';
$application = new Application();
$application->registerMountProviders();
\OCP\App::registerAdmin('files_sharing', 'settings-admin');
\OCP\App::registerPersonal('files_sharing', 'settings-personal');
@ -52,6 +50,9 @@ $application->registerMountProviders();
\OCP\Share::registerBackend('file', 'OC_Share_Backend_File');
\OCP\Share::registerBackend('folder', 'OC_Share_Backend_Folder', 'file');
$application = new Application();
$application->registerMountProviders();
$eventDispatcher = \OC::$server->getEventDispatcher();
$eventDispatcher->addListener(
'OCA\Files::loadAdditionalScripts',