From be4e30917d1c7f77c1ed15d9c53dbea4f5918170 Mon Sep 17 00:00:00 2001 From: Andrew Summers <18727110+summersab@users.noreply.github.com> Date: Tue, 29 Aug 2023 18:00:29 -0500 Subject: [PATCH] Refactor `OC\Server::getEncryptionFilesHelper` Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com> --- lib/private/Encryption/EncryptionWrapper.php | 3 ++- lib/private/Encryption/HookManager.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/private/Encryption/EncryptionWrapper.php b/lib/private/Encryption/EncryptionWrapper.php index 37264e81823..887ca988b1a 100644 --- a/lib/private/Encryption/EncryptionWrapper.php +++ b/lib/private/Encryption/EncryptionWrapper.php @@ -28,6 +28,7 @@ use OC\Files\Filesystem; use OC\Files\Storage\Wrapper\Encryption; use OC\Files\View; use OC\Memcache\ArrayCache; +use OCP\Encryption\IFile; use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage; use Psr\Log\LoggerInterface; @@ -79,7 +80,7 @@ class EncryptionWrapper { $user = \OC::$server->getUserSession()->getUser(); $mountManager = Filesystem::getMountManager(); $uid = $user ? $user->getUID() : null; - $fileHelper = \OC::$server->getEncryptionFilesHelper(); + $fileHelper = \OC::$server->get(IFile::class); $keyStorage = \OC::$server->getEncryptionKeyStorage(); $util = new Util( diff --git a/lib/private/Encryption/HookManager.php b/lib/private/Encryption/HookManager.php index 5081bcccf94..0e8704ad03f 100644 --- a/lib/private/Encryption/HookManager.php +++ b/lib/private/Encryption/HookManager.php @@ -26,6 +26,7 @@ namespace OC\Encryption; use OC\Files\Filesystem; use OC\Files\View; use OC\Files\SetupManager; +use OCP\Encryption\IFile; use Psr\Log\LoggerInterface; class HookManager { @@ -79,7 +80,7 @@ class HookManager { \OC::$server->getConfig()), Filesystem::getMountManager(), \OC::$server->getEncryptionManager(), - \OC::$server->getEncryptionFilesHelper(), + \OC::$server->get(IFile::class), \OC::$server->get(LoggerInterface::class), $uid ); -- 2.39.5