aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-06-13 14:01:34 +0200
committerGitHub <noreply@github.com>2024-06-13 14:01:34 +0200
commit3a60e40a81ab56b890e5022124c6e8fc7d79e3e4 (patch)
treeb67f55613368e280bd3689dab77d0552abb9e4c3 /lib/private/Files
parent76e7389f6aea0dd9c7177a6c87d5a4492b077f92 (diff)
parentf5219a19b2cbf91857b6b14dec5f43ec3a6a82c1 (diff)
downloadnextcloud-server-3a60e40a81ab56b890e5022124c6e8fc7d79e3e4.tar.gz
nextcloud-server-3a60e40a81ab56b890e5022124c6e8fc7d79e3e4.zip
Merge pull request #45172 from nextcloud/test-scanner-no-transactions
feat: add option to disable scanner transactions
Diffstat (limited to 'lib/private/Files')
-rw-r--r--lib/private/Files/Cache/Scanner.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php
index c44fc6fbd3d..c85104ac4b9 100644
--- a/lib/private/Files/Cache/Scanner.php
+++ b/lib/private/Files/Cache/Scanner.php
@@ -11,6 +11,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;
@@ -67,7 +68,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);
}