[stable16] Prevent faulty logs from nested setupFS calls (#16029)

[stable16] Prevent faulty logs from nested setupFS calls
This commit is contained in:
John Molakvoæ 2019-06-24 17:25:25 +02:00 committed by GitHub
commit 5fed2ddb9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -204,7 +204,7 @@ class OC_Util {
\OC\Files\Filesystem::initMountManager(); \OC\Files\Filesystem::initMountManager();
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false); $prevLogging = \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false);
\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 */
@ -279,7 +279,8 @@ class OC_Util {
}); });
OC_Hook::emit('OC_Filesystem', 'preSetup', array('user' => $user)); OC_Hook::emit('OC_Filesystem', 'preSetup', array('user' => $user));
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(true);
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($prevLogging);
//check if we are using an object storage //check if we are using an object storage
$objectStore = \OC::$server->getSystemConfig()->getValue('objectstore', null); $objectStore = \OC::$server->getSystemConfig()->getValue('objectstore', null);