diff options
author | Robin Appelman <robin@icewind.nl> | 2024-05-03 16:37:45 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-05-03 16:40:15 +0200 |
commit | f5219a19b2cbf91857b6b14dec5f43ec3a6a82c1 (patch) | |
tree | 6b4234a81b37771ccb75425cead3984a618ad972 /lib/private/Files/Cache | |
parent | 19602a0cee03afe954d3996b3cdcb7c3800e9b5d (diff) | |
download | nextcloud-server-f5219a19b2cbf91857b6b14dec5f43ec3a6a82c1.tar.gz nextcloud-server-f5219a19b2cbf91857b6b14dec5f43ec3a6a82c1.zip |
feat: add option to disable scanner transactions
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 1c66f3af8d2..7c2e650e58c 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -39,6 +39,7 @@ use Doctrine\DBAL\Exception; use OC\Files\Storage\Wrapper\Encryption; use OC\Files\Storage\Wrapper\Jail; use OC\Hooks\BasicEmitter; +use OC\SystemConfig; use OCP\Files\Cache\IScanner; use OCP\Files\ForbiddenException; use OCP\Files\NotFoundException; @@ -95,7 +96,10 @@ class Scanner extends BasicEmitter implements IScanner { $this->storage = $storage; $this->storageId = $this->storage->getId(); $this->cache = $storage->getCache(); - $this->cacheActive = !\OC::$server->getConfig()->getSystemValueBool('filesystem_cache_readonly', false); + /** @var SystemConfig $config */ + $config = \OC::$server->get(SystemConfig::class); + $this->cacheActive = !$config->getValue('filesystem_cache_readonly', false); + $this->useTransactions = !$config->getValue('filescanner_no_transactions', false); $this->lockingProvider = \OC::$server->get(ILockingProvider::class); $this->connection = \OC::$server->get(IDBConnection::class); } |