From 7d6da68d532fe1b1299f3a724e70b8ec3960ec8d Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Fri, 26 Oct 2012 23:25:52 +0200
Subject: [PATCH] prove some compatibility with the old cache api

---
 lib/files/view.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/files/view.php b/lib/files/view.php
index e9b583f8ae6..04b7dca8afc 100644
--- a/lib/files/view.php
+++ b/lib/files/view.php
@@ -712,7 +712,7 @@ class View {
 		$files = $cache->getFolderContents($internalPath); //TODO: mimetype_filter
 
 		//add a folder for any mountpoint in this directory and add the sizes of other mountpoints to the folders
-		$mountPoints = Filesystem::getMountPoints($directory);
+		$mountPoints = Filesystem::getMountPoints($path);
 		$dirLength = strlen($path);
 		foreach ($mountPoints as $mountPoint) {
 			$subStorage = Filesystem::getStorage($mountPoint);
@@ -733,6 +733,10 @@ class View {
 			}
 		}
 
+		foreach($files as $i => $file){
+			$files[$i]['type'] = $file['mimetype'] === 'httpd/unix-directory' ? 'dir' : 'file';
+		}
+
 		usort($files, "fileCmp"); //TODO: remove this once ajax is merged
 		return $files;
 	}
-- 
GitLab