From 032ffc969eeed452091646e35c31003297186b41 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 8 Jul 2015 19:09:10 +0200 Subject: Move mimetypealiases.json to mimetypealiases.dist.json --- core/command/maintenance/mimetypesjs.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/command/maintenance/mimetypesjs.php b/core/command/maintenance/mimetypesjs.php index 95a4bcd891a..8b01f0acf79 100644 --- a/core/command/maintenance/mimetypesjs.php +++ b/core/command/maintenance/mimetypesjs.php @@ -33,7 +33,12 @@ class MimeTypesJS extends Command { protected function execute(InputInterface $input, OutputInterface $output) { // Fetch all the aliases - $aliases = json_decode(file_get_contents(dirname(__DIR__) . '/../../config/mimetypealiases.json'), true); + $aliases = json_decode(file_get_contents(\OC::$SERVERROOT . '/config/mimetypealiases.dist.json'), true); + + if (file_exists(\OC::$SERVERROOT . '/config/mimetypealiases.json')) { + $custom = get_object_vars(json_decode(file_get_contents(\OC::$SERVERROOT . '/config/mimetypealiases.json'))); + $aliases = array_merge($aliases, $custom); + } // Remove comments $keys = array_filter(array_keys($aliases), function($k) { -- cgit v1.2.3