aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files/utils/scanner.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-12-10 16:17:29 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-12-10 16:17:29 +0100
commit80ae311329f56295e9ec6a4d3cee66cb9afc1a4f (patch)
tree24ca0805d06f7af4da69ecf635d77c6f40041ee1 /lib/private/files/utils/scanner.php
parent3898fbc0d2d65785b8b132645c5bf99077d16818 (diff)
parent0f17486c1d6d974e25ea75597bd2ca6f50e5e538 (diff)
downloadnextcloud-server-80ae311329f56295e9ec6a4d3cee66cb9afc1a4f.tar.gz
nextcloud-server-80ae311329f56295e9ec6a4d3cee66cb9afc1a4f.zip
Merge pull request #11892 from owncloud/remove_triggerupdate
Remove triggerupdate.php & add quiet option for CLI scanner
Diffstat (limited to 'lib/private/files/utils/scanner.php')
-rw-r--r--lib/private/files/utils/scanner.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php
index 19a2ed38e1b..662d4ac03c7 100644
--- a/lib/private/files/utils/scanner.php
+++ b/lib/private/files/utils/scanner.php
@@ -114,7 +114,7 @@ class Scanner extends PublicEmitter {
* @param string $dir
* @throws \OC\ForbiddenException
*/
- public function scan($dir) {
+ public function scan($dir = '') {
$mounts = $this->getMounts($dir);
foreach ($mounts as $mount) {
if (is_null($mount->getStorage())) {
@@ -127,11 +127,12 @@ class Scanner extends PublicEmitter {
) {
throw new ForbiddenException();
}
+ $relativePath = $mount->getInternalPath($dir);
$scanner = $storage->getScanner();
$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);
+ $scanner->scan($relativePath, \OC\Files\Cache\Scanner::SCAN_RECURSIVE, \OC\Files\Cache\Scanner::REUSE_ETAG | \OC\Files\Cache\Scanner::REUSE_SIZE);
$this->db->commit();
}
$this->propagator->propagateChanges(time());