summaryrefslogtreecommitdiffstats
path: root/lib/private/files/filesystem.php
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-01-21 22:27:59 +0100
committerVincent Petry <pvince81@owncloud.com>2015-01-22 16:24:24 +0100
commit6fb553e92cd62926134f4f77a3069fa4439835fe (patch)
tree0196a237de384153c2d1e430384287eae4281353 /lib/private/files/filesystem.php
parentff5715779c56ceacc870307bf25f4e769ff22a1a (diff)
downloadnextcloud-server-6fb553e92cd62926134f4f77a3069fa4439835fe.tar.gz
nextcloud-server-6fb553e92cd62926134f4f77a3069fa4439835fe.zip
Do not call wrapStorage if storate with same name added twice
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) {