Merge pull request #16031 from nextcloud/backport/15540/stable14

[stable14] Prevent faulty logs from nested setupFS calls
This commit is contained in:
Roeland Jago Douma 2019-06-25 13:33:24 +02:00 committed by GitHub
commit 31db210451
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -203,7 +203,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 */
@ -278,7 +278,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);