diff --git a/lib/files/view.php b/lib/files/view.php
index 994dbcc85cfd4f111b965ef971dec6f74a80a27a..6d917bb585e45ff846a510dd536a525e6544c880 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -728,7 +728,7 @@ class View {
 		if ($storage) {
 			$cache = $storage->getCache();
 
-			if (!$cache->inCache($internalPath)) {
+			if ($cache->getStatus($internalPath) < Cache\Cache::COMPLETE) {
 				$scanner = $storage->getScanner();
 				$scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW);
 			} else {
diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php
index 1b8f6dc1e8cc3e383e431e4eec3cfa828d2a3b9e..712166ab32cf8a4ff6f1babea699aabcdc78b88a 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);