Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prevent faulty logs from nested setupFS calls
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and Backportbot committed Jun 21, 2019
commit 7b80635b82c4a5508003766cd08eaf290c917fef
5 changes: 3 additions & 2 deletions lib/private/legacy/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public static function setupFS($user = '') {

\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 */
Expand Down Expand Up @@ -278,7 +278,8 @@ public static function setupFS($user = '') {
});

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);
Expand Down