Prevent faulty logs from nested setupFS calls

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-05-15 10:22:51 +02:00 committed by Backportbot
parent 5055d63f37
commit 92f11a646b
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::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) {
if ($storage->instanceOfStorage('\OC\Files\Storage\Common')) {
/** @var \OC\Files\Storage\Common $storage */
@ -279,7 +279,8 @@ class OC_Util {
});
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
$objectStore = \OC::$server->getSystemConfig()->getValue('objectstore', null);