diff options
author | Robin Appelman <robin@icewind.nl> | 2023-10-19 19:27:00 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-11-07 13:59:32 +0000 |
commit | 204aedc606ab53d3d4b2beb70dd6e72043b1f98b (patch) | |
tree | 979c64717efdaae0864195f9db21cee84329944c /lib/private/Files | |
parent | 8b6750ceac4593e81fe07fb6c22eb1bc8ea2a943 (diff) | |
download | nextcloud-server-204aedc606ab53d3d4b2beb70dd6e72043b1f98b.tar.gz nextcloud-server-204aedc606ab53d3d4b2beb70dd6e72043b1f98b.zip |
optimize cache jail creation
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Jail.php | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index c4446473833..6ad753f3b39 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -52,8 +52,6 @@ class CacheJail extends CacheWrapper { public function __construct($cache, $root) { parent::__construct($cache); $this->root = $root; - $this->connection = \OC::$server->getDatabaseConnection(); - $this->mimetypeLoader = \OC::$server->getMimeTypeLoader(); if ($cache instanceof CacheJail) { $this->unjailedRoot = $cache->getSourcePath($root); diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index caf039d4cca..a7f051ebd64 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -396,10 +396,7 @@ class Jail extends Wrapper { * @return \OC\Files\Cache\Cache */ public function getCache($path = '', $storage = null) { - if (!$storage) { - $storage = $this->getWrapperStorage(); - } - $sourceCache = $this->getWrapperStorage()->getCache($this->getUnjailedPath($path), $storage); + $sourceCache = $this->getWrapperStorage()->getCache($this->getUnjailedPath($path)); return new CacheJail($sourceCache, $this->rootPath); } |