diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-06-17 18:03:57 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-06-17 18:03:57 +0200 |
commit | 2ed0e6e91573489b9db0c37d1d4f3ae1c1393f00 (patch) | |
tree | 8f694637004b2846ea657bbcc35755be27e83baf /lib/files | |
parent | 398fe8bf3255df7ac9d301522401c4a746a0e7f9 (diff) | |
download | nextcloud-server-2ed0e6e91573489b9db0c37d1d4f3ae1c1393f00.tar.gz nextcloud-server-2ed0e6e91573489b9db0c37d1d4f3ae1c1393f00.zip |
add tests for reusing existing data in scanner
Diffstat (limited to 'lib/files')
-rw-r--r-- | lib/files/cache/scanner.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index 061778cd852..e7fbd856d5a 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -119,7 +119,7 @@ class Scanner { $reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : 0; } $this->scanFile($path, $reuse); - return $this->scanChildren($path, $recursive); + return $this->scanChildren($path, $recursive, $reuse); } /** @@ -165,9 +165,7 @@ class Scanner { $size += $childSize; } } - if ($size !== -1) { - $this->cache->put($path, array('size' => $size)); - } + $this->cache->put($path, array('size' => $size)); } return $size; } |