diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-12-15 03:20:50 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-12-15 03:21:39 +0100 |
commit | cf3665057c0c195bb3a0e2d9f8f8746f5d2f5787 (patch) | |
tree | c62c31a64ccb7d9d702006fd22c94ea8a6afbc1c /tests/lib/files/view.php | |
parent | 4be039e6cbc0a826b07fc2af1a6c6d94888a9187 (diff) | |
download | nextcloud-server-cf3665057c0c195bb3a0e2d9f8f8746f5d2f5787.tar.gz nextcloud-server-cf3665057c0c195bb3a0e2d9f8f8746f5d2f5787.zip |
make sure folders that are not fully scanned are at least shallow scanned when we open them
the fact that they are in the cache does not mean they are scanned
Diffstat (limited to 'tests/lib/files/view.php')
-rw-r--r-- | tests/lib/files/view.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index 1b8f6dc1e8c..712166ab32c 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -97,6 +97,19 @@ class View extends \PHPUnit_Framework_TestCase { $this->assertEquals(array(), $rootView->getDirectoryContent('/non/existing')); } + function testCacheIncompleteFolder() { + $storage1 = $this->getTestStorage(false); + \OC\Files\Filesystem::mount($storage1, array(), '/'); + $rootView = new \OC\Files\View(''); + + $entries = $rootView->getDirectoryContent('/'); + $this->assertEquals(3, count($entries)); + + // /folder will already be in the cache but not scanned + $entries = $rootView->getDirectoryContent('/folder'); + $this->assertEquals(1, count($entries)); + } + public function testAutoScan() { $storage1 = $this->getTestStorage(false); $storage2 = $this->getTestStorage(false); |