diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2024-06-13 18:33:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-13 18:33:33 +0200 |
commit | 77f00ae8128030f54d23d6c0277d74b7bab7aae5 (patch) | |
tree | a2b677fb879a16a260edfc049fdab07de23829fd | |
parent | 72453d806cadbc2202165b5cc8f709a5e4422706 (diff) | |
parent | 6c4e74b6ec5a982320d7892cad4886df39fed507 (diff) | |
download | nextcloud-server-77f00ae8128030f54d23d6c0277d74b7bab7aae5.tar.gz nextcloud-server-77f00ae8128030f54d23d6c0277d74b7bab7aae5.zip |
Merge pull request #45681 from nextcloud/test-scanner-no-transactions-27
[27] feat: add option to disable scanner transactions
-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 fd1aba9f99b..b820fda1dde 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -37,6 +37,7 @@ namespace OC\Files\Cache; use Doctrine\DBAL\Exception; use OC\Files\Storage\Wrapper\Encryption; +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->getLockingProvider(); $this->connection = \OC::$server->get(IDBConnection::class); } |