diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Filesystem.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php index ac0e66973d4..42a6d950332 100644 --- a/lib/private/Files/Filesystem.php +++ b/lib/private/Files/Filesystem.php @@ -214,10 +214,13 @@ class Filesystem { /** * @param bool $shouldLog + * @return bool previous value * @internal */ public static function logWarningWhenAddingStorageWrapper($shouldLog) { - self::$logWarningWhenAddingStorageWrapper = (bool)$shouldLog; + $previousValue = self::$logWarningWhenAddingStorageWrapper; + self::$logWarningWhenAddingStorageWrapper = (bool) $shouldLog; + return $previousValue; } /** @@ -226,7 +229,7 @@ class Filesystem { * @param int $priority */ public static function addStorageWrapper($wrapperName, $wrapper, $priority = 50) { - if (self::$logWarningWhenAddingStorageWrapper && $wrapperName !== 'readonly') { + if (self::$logWarningWhenAddingStorageWrapper) { \OC::$server->getLogger()->warning("Storage wrapper '{wrapper}' was not registered via the 'OC_Filesystem - preSetup' hook which could cause potential problems.", [ 'wrapper' => $wrapperName, 'app' => 'filesystem', |