diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php
index c7da4505af5692683efca9e386fb5d4134887c80..adb66497be074d795e4f40704a0154bc71b8ae09 100644
--- a/lib/private/files/utils/scanner.php
+++ b/lib/private/files/utils/scanner.php
@@ -128,7 +128,7 @@ class Scanner extends PublicEmitter {
 				throw new ForbiddenException();
 			}
 			$scanner = $storage->getScanner();
-			$scanner->useTransactions(false);
+			$scanner->setUseTransactions(false);
 			$this->attachListener($mount);
 			$this->db->beginTransaction();
 			$scanner->scan('', \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE);