]> source.dussan.org Git - nextcloud-server.git/commitdiff
Prevent faulty logs from nested setupFS calls 16030/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:02:23 +0000 (10:02 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/legacy/util.php

index 7ab137165474455cbce1d92e1cf8e4da6aba22c6..5b77f6d0614de9b03bac8f07215045f13b68b6a6 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);