From 049c4ad498a017b9c7019bbc8a05091bd2ae2c96 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 16 Aug 2017 13:40:14 +0200 Subject: [PATCH] Fix directory mime type in trashbin list --- apps/files_trashbin/lib/Helper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/files_trashbin/lib/Helper.php b/apps/files_trashbin/lib/Helper.php index c570a5f4d231..378b7f412907 100644 --- a/apps/files_trashbin/lib/Helper.php +++ b/apps/files_trashbin/lib/Helper.php @@ -114,7 +114,9 @@ public static function formatFileInfos($fileInfos) { $entry['id'] = $id++; $entry['etag'] = $entry['mtime']; // add fake etag, it is only needed to identify the preview image $entry['permissions'] = \OCP\Constants::PERMISSION_READ; - $entry['mimetype'] = \OC::$server->getMimeTypeDetector()->detectPath($entry['name']); + if ($entry['mimetype'] !== 'httpd/unix-directory') { + $entry['mimetype'] = \OC::$server->getMimeTypeDetector()->detectPath($entry['name']); + } $files[] = $entry; } return $files;