From 6fb553e92cd62926134f4f77a3069fa4439835fe Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 21 Jan 2015 22:27:59 +0100 Subject: Do not call wrapStorage if storate with same name added twice --- lib/private/files/filesystem.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/private/files/filesystem.php') 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) { -- cgit v1.2.3