Skip to content

Commit 9d12198

Browse files
Merge pull request #15540 from nextcloud/bugfix/noid/prevent-faulty-logs-from-nested-setupFS-calls
Prevent faulty logs from nested setupFS calls
2 parents c1eff72 + 22fa642 commit 9d12198

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/private/legacy/util.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public static function setupFS($user = '') {
204204

205205
\OC\Files\Filesystem::initMountManager();
206206

207-
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false);
207+
$prevLogging = \OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(false);
208208
\OC\Files\Filesystem::addStorageWrapper('mount_options', function ($mountPoint, \OCP\Files\Storage $storage, \OCP\Files\Mount\IMountPoint $mount) {
209209
if ($storage->instanceOfStorage('\OC\Files\Storage\Common')) {
210210
/** @var \OC\Files\Storage\Common $storage */
@@ -279,7 +279,8 @@ public static function setupFS($user = '') {
279279
});
280280

281281
OC_Hook::emit('OC_Filesystem', 'preSetup', array('user' => $user));
282-
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper(true);
282+
283+
\OC\Files\Filesystem::logWarningWhenAddingStorageWrapper($prevLogging);
283284

284285
//check if we are using an object storage
285286
$objectStore = \OC::$server->getSystemConfig()->getValue('objectstore', null);

0 commit comments

Comments
 (0)