From: Joas Schilling Date: Wed, 15 May 2019 08:22:51 +0000 (+0200) Subject: Prevent faulty logs from nested setupFS calls X-Git-Tag: v16.0.2RC1~21^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=92f11a646bffb7009dfc5941934b12ff31b931eb;p=nextcloud-server.git Prevent faulty logs from nested setupFS calls Signed-off-by: Joas Schilling --- diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index 9bada5bb733..810f22fb9e5 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -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);