diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-12-10 11:04:17 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-12-10 11:04:17 +0100 |
commit | 0f17486c1d6d974e25ea75597bd2ca6f50e5e538 (patch) | |
tree | be8185ab017f4f456baa0e04c99684923b38b3b0 /lib | |
parent | 3cdaa4094fe7a8fa6db4885dd9a426053e845a53 (diff) | |
download | nextcloud-server-0f17486c1d6d974e25ea75597bd2ca6f50e5e538.tar.gz nextcloud-server-0f17486c1d6d974e25ea75597bd2ca6f50e5e538.zip |
make path absolute
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/cache/scanner.php | 6 | ||||
-rw-r--r-- | lib/private/files/utils/scanner.php | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 444207518b2..a5383cee10d 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -219,8 +219,10 @@ class Scanner extends BasicEmitter { $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : 0; } $data = $this->scanFile($path, $reuse); - $size = $this->scanChildren($path, $recursive, $reuse); - $data['size'] = $size; + if ($data !== null) { + $size = $this->scanChildren($path, $recursive, $reuse); + $data['size'] = $size; + } return $data; } diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php index a0b06328579..7625e52e015 100644 --- a/lib/private/files/utils/scanner.php +++ b/lib/private/files/utils/scanner.php @@ -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($dir, \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()); |