]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent faulty logs from nested setupFS calls 16029/head
authorJoas Schilling <coding@schilljs.com>
Wed, 15 May 2019 08:22:51 +0000 (10:22 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Fri, 21 Jun 2019 10:01:28 +0000 (10:01 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/legacy/util.php

index 9bada5bb733be1acce15d995deeef71e79ead698..810f22fb9e5888139972bb4a36e1fdb943dde512 100644 (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);