aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/filesystem.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/filesystem.php')
-rw-r--r--lib/private/files/filesystem.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index f90b2738d03..0a0c5c3612a 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -175,7 +175,10 @@ class Filesystem {
* @param callable $wrapper
*/
public static function addStorageWrapper($wrapperName, $wrapper) {
- self::getLoader()->addStorageWrapper($wrapperName, $wrapper);
+ if (!self::getLoader()->addStorageWrapper($wrapperName, $wrapper)) {
+ // do not re-wrap if storage with this name already existed
+ return;
+ }
$mounts = self::getMountManager()->getAll();
foreach ($mounts as $mount) {