1
0
şunun yansıması https://github.com/nextcloud/server.git eşitlendi 2024-08-22 05:55:27 +02:00

Don't add the Encryption Storage Wrapper if there are no encryption modules

fixes #4125

If there is no encryption module enabled it makes no sense to setup the
encryption wrapper (because we can't do anything anyway).

This saves reading the header of files.
Especialy on external storage/objectstore this should improve
performance

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Bu işleme şunda yer alıyor:
Roeland Jago Douma 2017-03-29 12:23:46 +02:00
ebeveyn c1030a34a5
işleme 111c9f7563
Veri tabanında bu imza için bilinen anahtar bulunamadı
GPG Anahtar Kimliği: F941078878347C0C

Dosyayı Görüntüle

@ -254,8 +254,11 @@ class Manager implements IManager {
* Add storage wrapper
*/
public function setupStorage() {
$encryptionWrapper = new EncryptionWrapper($this->arrayCache, $this, $this->logger);
Filesystem::addStorageWrapper('oc_encryption', array($encryptionWrapper, 'wrapStorage'), 2);
// If encryption is disabled and there are no loaded modules it makes no sense to load the wrapper
if (!empty($this->encryptionModules) || $this->isEnabled()) {
$encryptionWrapper = new EncryptionWrapper($this->arrayCache, $this, $this->logger);
Filesystem::addStorageWrapper('oc_encryption', array($encryptionWrapper, 'wrapStorage'), 2);
}
}