Skip to content

Commit

Permalink
Merge pull request #45681 from nextcloud/test-scanner-no-transactions-27
Browse files Browse the repository at this point in the history
[27] feat: add option to disable scanner transactions
  • Loading branch information
AndyScherzinger authored Jun 13, 2024
2 parents 72453d8 + 6c4e74b commit 77f00ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/private/Files/Cache/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

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;
Expand Down Expand Up @@ -95,7 +96,10 @@ public function __construct(\OC\Files\Storage\Storage $storage) {
$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);
}
Expand Down

0 comments on commit 77f00ae

Please sign in to comment.