summaryrefslogtreecommitdiffstats
path: root/lib/files
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-06-17 18:03:57 +0200
committerRobin Appelman <icewind@owncloud.com>2013-06-19 13:33:25 +0200
commitb06432fef09b2fc5fd278010db6a3a15f4806c3a (patch)
tree7103218bf4e74f45f760b7b6d5ef130efdc6def8 /lib/files
parenta498876aa61287a01a18b279f497e57a5f15572b (diff)
downloadnextcloud-server-b06432fef09b2fc5fd278010db6a3a15f4806c3a.tar.gz
nextcloud-server-b06432fef09b2fc5fd278010db6a3a15f4806c3a.zip
add tests for reusing existing data in scanner
Diffstat (limited to 'lib/files')
-rw-r--r--lib/files/cache/scanner.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index 4cb856bfaec..fe237c26cfa 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -118,7 +118,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);
}
/**
@@ -164,9 +164,7 @@ class Scanner {
$size += $childSize;
}
}
- if ($size !== -1) {
- $this->cache->put($path, array('size' => $size));
- }
+ $this->cache->put($path, array('size' => $size));
}
return $size;
}