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 bad2e92c89c22fb74aa1f3c3d6c25eb52121a238
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