From eea56dc309ea8fc5855990a7608654c3b07cf8ae Mon Sep 17 00:00:00 2001
From: Roeland Jago Douma <roeland@famdouma.nl>
Date: Thu, 9 Jul 2015 13:57:09 +0200
Subject: [PATCH] MimeTypes now also supports httpd/unix-directory

Since we both use dir and httpd/unix-directory in OC they should map to
the same icon.

Fixes #17527
---
 config/mimetypealiases.json | 119 ++++++++++++++++++------------------
 core/js/mimetypelist.js     |   1 +
 2 files changed, 61 insertions(+), 59 deletions(-)

diff --git a/config/mimetypealiases.json b/config/mimetypealiases.json
index d1684460ef..f1b13b67ee 100644
--- a/config/mimetypealiases.json
+++ b/config/mimetypealiases.json
@@ -4,65 +4,66 @@
 	"_comment3": "Otherwise your update won't propagate through the system",
 
 
-	"application/coreldraw": "image", 
-	"application/font-sfnt": "font", 
-	"application/font-woff": "font", 
-	"application/illustrator": "image/vector", 
-	"application/json": "text/code", 
-	"application/msaccess": "database", 
-	"application/msexcel": "x-office/spreadsheet", 
-	"application/mspowerpoint": "x-office/presentation", 
-	"application/msword": "x-office/document", 
-	"application/octet-stream": "file", 
-	"application/postscript": "image/vector", 
-	"application/vnd.android.package-archive": "package/x-generic", 
-	"application/vnd.ms-excel": "x-office/spreadsheet", 
-	"application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet", 
-	"application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet", 
-	"application/vnd.ms-excel.sheet.macroEnabled.12": "x-office/spreadsheet", 
-	"application/vnd.ms-excel.template.macroEnabled.12": "x-office/spreadsheet", 
-	"application/vnd.ms-fontobject": "font", 
-	"application/vnd.ms-powerpoint": "x-office/presentation", 
-	"application/vnd.ms-powerpoint.addin.macroEnabled.12": "x-office/presentation", 
-	"application/vnd.ms-powerpoint.presentation.macroEnabled.12": "x-office/presentation", 
-	"application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "x-office/presentation", 
-	"application/vnd.ms-powerpoint.template.macroEnabled.12": "x-office/presentation", 
-	"application/vnd.ms-word.document.macroEnabled.12": "x-office/document", 
-	"application/vnd.ms-word.template.macroEnabled.12": "x-office/document", 
-	"application/vnd.oasis.opendocument.presentation": "x-office/presentation", 
-	"application/vnd.oasis.opendocument.presentation-template": "x-office/presentation", 
-	"application/vnd.oasis.opendocument.spreadsheet": "x-office/spreadsheet", 
-	"application/vnd.oasis.opendocument.spreadsheet-template": "x-office/spreadsheet", 
-	"application/vnd.oasis.opendocument.text": "x-office/document", 
-	"application/vnd.oasis.opendocument.text-master": "x-office/document", 
-	"application/vnd.oasis.opendocument.text-template": "x-office/document", 
-	"application/vnd.oasis.opendocument.text-web": "x-office/document", 
-	"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation", 
-	"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation", 
-	"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation", 
-	"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "x-office/spreadsheet", 
-	"application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet", 
-	"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document", 
-	"application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document", 
-	"application/x-7z-compressed": "package/x-generic", 
-	"application/x-compressed": "package/x-generic", 
-	"application/x-dcraw": "image", 
-	"application/x-deb": "package/x-generic", 
-	"application/x-font": "font", 
-	"application/x-gimp": "image", 
-	"application/x-gzip": "package/x-generic", 
-	"application/x-perl": "text/code", 
-	"application/x-photoshop": "image", 
-	"application/x-php": "text/code", 
-	"application/x-rar-compressed": "package/x-generic", 
-	"application/x-tar": "package/x-generic", 
-	"application/x-tex": "text", 
-	"application/xml": "text/html", 
-	"application/yaml": "text/code", 
-	"application/zip": "package/x-generic", 
-	"image/svg+xml": "image/vector", 
-	"text/css": "text/code", 
-	"text/csv": "x-office/spreadsheet", 
+	"application/coreldraw": "image",
+	"application/font-sfnt": "font",
+	"application/font-woff": "font",
+	"application/illustrator": "image/vector",
+	"application/json": "text/code",
+	"application/msaccess": "database",
+	"application/msexcel": "x-office/spreadsheet",
+	"application/mspowerpoint": "x-office/presentation",
+	"application/msword": "x-office/document",
+	"application/octet-stream": "file",
+	"application/postscript": "image/vector",
+	"application/vnd.android.package-archive": "package/x-generic",
+	"application/vnd.ms-excel": "x-office/spreadsheet",
+	"application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet",
+	"application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet",
+	"application/vnd.ms-excel.sheet.macroEnabled.12": "x-office/spreadsheet",
+	"application/vnd.ms-excel.template.macroEnabled.12": "x-office/spreadsheet",
+	"application/vnd.ms-fontobject": "font",
+	"application/vnd.ms-powerpoint": "x-office/presentation",
+	"application/vnd.ms-powerpoint.addin.macroEnabled.12": "x-office/presentation",
+	"application/vnd.ms-powerpoint.presentation.macroEnabled.12": "x-office/presentation",
+	"application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "x-office/presentation",
+	"application/vnd.ms-powerpoint.template.macroEnabled.12": "x-office/presentation",
+	"application/vnd.ms-word.document.macroEnabled.12": "x-office/document",
+	"application/vnd.ms-word.template.macroEnabled.12": "x-office/document",
+	"application/vnd.oasis.opendocument.presentation": "x-office/presentation",
+	"application/vnd.oasis.opendocument.presentation-template": "x-office/presentation",
+	"application/vnd.oasis.opendocument.spreadsheet": "x-office/spreadsheet",
+	"application/vnd.oasis.opendocument.spreadsheet-template": "x-office/spreadsheet",
+	"application/vnd.oasis.opendocument.text": "x-office/document",
+	"application/vnd.oasis.opendocument.text-master": "x-office/document",
+	"application/vnd.oasis.opendocument.text-template": "x-office/document",
+	"application/vnd.oasis.opendocument.text-web": "x-office/document",
+	"application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation",
+	"application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation",
+	"application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation",
+	"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "x-office/spreadsheet",
+	"application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet",
+	"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document",
+	"application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document",
+	"application/x-7z-compressed": "package/x-generic",
+	"application/x-compressed": "package/x-generic",
+	"application/x-dcraw": "image",
+	"application/x-deb": "package/x-generic",
+	"application/x-font": "font",
+	"application/x-gimp": "image",
+	"application/x-gzip": "package/x-generic",
+	"application/x-perl": "text/code",
+	"application/x-photoshop": "image",
+	"application/x-php": "text/code",
+	"application/x-rar-compressed": "package/x-generic",
+	"application/x-tar": "package/x-generic",
+	"application/x-tex": "text",
+	"application/xml": "text/html",
+	"application/yaml": "text/code",
+	"application/zip": "package/x-generic",
+	"httpd/unix-directory": "dir",
+	"image/svg+xml": "image/vector",
+	"text/css": "text/code",
+	"text/csv": "x-office/spreadsheet",
 	"text/x-shellscript": "text/code"
 }
 
diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js
index 2a780fc2bc..b4de98247d 100644
--- a/core/js/mimetypelist.js
+++ b/core/js/mimetypelist.js
@@ -64,6 +64,7 @@ OC.MimeTypeList={
     "application/xml": "text/html",
     "application/yaml": "text/code",
     "application/zip": "package/x-generic",
+    "httpd/unix-directory": "dir",
     "image/svg+xml": "image/vector",
     "text/css": "text/code",
     "text/csv": "x-office/spreadsheet",
-- 
GitLab