summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-09-08 01:34:03 +0200
committerRobin Appelman <icewind@owncloud.com>2014-09-08 14:15:41 +0200
commit644755df663e8dc295e92700da208a28c13cbaab (patch)
treeed9299c6e9d5091248c57907827721b15b70a82e /apps/files
parent637cff68ac2944d6029eb015640bbbd0e686641b (diff)
downloadnextcloud-server-644755df663e8dc295e92700da208a28c13cbaab.tar.gz
nextcloud-server-644755df663e8dc295e92700da208a28c13cbaab.zip
Use bigger transactions when doing explicit file system scans
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/ajax/scan.php2
-rw-r--r--apps/files/command/scan.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php
index 3ec7f9394b1..43760cc4196 100644
--- a/apps/files/ajax/scan.php
+++ b/apps/files/ajax/scan.php
@@ -20,7 +20,7 @@ $listener = new ScanListener($eventSource);
foreach ($users as $user) {
$eventSource->send('user', $user);
- $scanner = new \OC\Files\Utils\Scanner($user);
+ $scanner = new \OC\Files\Utils\Scanner($user, \OC::$server->getDatabaseConnection());
$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', array($listener, 'file'));
$scanner->listen('\OC\Files\Utils\Scanner', 'scanFolder', array($listener, 'folder'));
if ($force) {
diff --git a/apps/files/command/scan.php b/apps/files/command/scan.php
index 3412cf80dea..e4d719a8b4b 100644
--- a/apps/files/command/scan.php
+++ b/apps/files/command/scan.php
@@ -46,7 +46,7 @@ class Scan extends Command {
}
protected function scanFiles($user, OutputInterface $output) {
- $scanner = new \OC\Files\Utils\Scanner($user);
+ $scanner = new \OC\Files\Utils\Scanner($user, \OC::$server->getDatabaseConnection());
$scanner->listen('\OC\Files\Utils\Scanner', 'scanFile', function ($path) use ($output) {
$output->writeln("Scanning <info>$path</info>");
});