feat: add option to disable scanner transactions

Signed-off-by: Robin Appelman <robin@icewind.nl>
test-scanner-no-transactions
Robin Appelman 2 weeks ago
parent 19602a0cee
commit f5219a19b2
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB

@ -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);
}

Loading…
Cancel
Save