summaryrefslogtreecommitdiffstats
path: root/lib/private/files/utils/scanner.php
diff options
context:
space:
mode:
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());