Skip to content

Commit

Permalink
Also add new storage wrapper when initializing mount points
Browse files Browse the repository at this point in the history
Fixes #24249

When a storage wrapper registeres itself before the FS is initialized
this can create problems.
  • Loading branch information
rullzer committed Apr 26, 2016
1 parent 14c3491 commit 84588dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Files/Storage/StorageFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ public function addStorageWrapper($wrapperName, $callback, $priority = 50, $exis
return false;
}

$this->storageWrappers[$wrapperName] = ['wrapper' => $callback, 'priority' => $priority];

// apply to existing mounts before registering it to prevent applying it double in MountPoint::createStorage
foreach ($existingMounts as $mount) {
$mount->wrapStorage($callback);
}

$this->storageWrappers[$wrapperName] = ['wrapper' => $callback, 'priority' => $priority];
return true;
}

Expand Down

0 comments on commit 84588dd

Please sign in to comment.