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 committed May 15, 2019
commit 22fa6421e5d6751d707c28fe742901534a8c8f48
5 changes: 3 additions & 2 deletions lib/private/legacy/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,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 @@ -279,7 +279,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