Recognize .bat and .cmd files
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b4ade76665
commit
ade91c8fe2
3 changed files with 20 additions and 3 deletions
|
@ -308,6 +308,16 @@ class RepairMimeTypes implements IRepairStep {
|
||||||
self::updateMimetypes($updatedMimetypes);
|
self::updateMimetypes($updatedMimetypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function introduceWindowsProgramTypes() {
|
||||||
|
$updatedMimetypes = array(
|
||||||
|
'htaccess' => 'text/plain',
|
||||||
|
'bat' => 'application/x-msdos-program',
|
||||||
|
'cmd' => 'application/cmd',
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->updateMimetypes($updatedMimetypes);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fix mime types
|
* Fix mime types
|
||||||
*/
|
*/
|
||||||
|
@ -377,5 +387,9 @@ class RepairMimeTypes implements IRepairStep {
|
||||||
$out->info('Fixed richdocuments additional office mime types');
|
$out->info('Fixed richdocuments additional office mime types');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.13', '<') && $this->introduceWindowsProgramTypes()) {
|
||||||
|
$out->info('Fixed windows program mime types');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_comment" : "Array mapping file extensions to mimetypes (in alphabetical order]",
|
"_comment" : "Array mapping file extensions to mimetypes (in alphabetical order)",
|
||||||
"_comment2": "The first index in the mime type array is the assumed correct mimetype",
|
"_comment2": "The first index in the mime type array is the assumed correct mimetype",
|
||||||
"_comment3": "and the second (if present] is a secure alternative",
|
"_comment3": "and the second (if present) is a secure alternative",
|
||||||
|
|
||||||
"_comment4": "Any changes you make here will be overwritten on an update of Nextcloud",
|
"_comment4": "Any changes you make here will be overwritten on an update of Nextcloud",
|
||||||
"_comment5": "Put any custom mappings in a new file mimetypemapping.json in the config/ folder of Nextcloud",
|
"_comment5": "Put any custom mappings in a new file mimetypemapping.json in the config/ folder of Nextcloud",
|
||||||
|
@ -15,6 +15,7 @@
|
||||||
"arw": ["image/x-dcraw"],
|
"arw": ["image/x-dcraw"],
|
||||||
"avi": ["video/x-msvideo"],
|
"avi": ["video/x-msvideo"],
|
||||||
"bash": ["text/x-shellscript"],
|
"bash": ["text/x-shellscript"],
|
||||||
|
"bat": ["application/x-msdos-program"],
|
||||||
"blend": ["application/x-blender"],
|
"blend": ["application/x-blender"],
|
||||||
"bin": ["application/x-bin"],
|
"bin": ["application/x-bin"],
|
||||||
"bmp": ["image/bmp"],
|
"bmp": ["image/bmp"],
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
"cc": ["text/x-c"],
|
"cc": ["text/x-c"],
|
||||||
"cdr": ["application/coreldraw"],
|
"cdr": ["application/coreldraw"],
|
||||||
"class": ["application/java"],
|
"class": ["application/java"],
|
||||||
|
"cmd": ["application/cmd"],
|
||||||
"cnf": ["text/plain"],
|
"cnf": ["text/plain"],
|
||||||
"conf": ["text/plain"],
|
"conf": ["text/plain"],
|
||||||
"cpp": ["text/x-c++src"],
|
"cpp": ["text/x-c++src"],
|
||||||
|
@ -61,6 +63,7 @@
|
||||||
"h": ["text/x-h"],
|
"h": ["text/x-h"],
|
||||||
"hh": ["text/x-h"],
|
"hh": ["text/x-h"],
|
||||||
"hpp": ["text/x-h"],
|
"hpp": ["text/x-h"],
|
||||||
|
"htaccess": ["text/plain"],
|
||||||
"html": ["text/html", "text/plain"],
|
"html": ["text/html", "text/plain"],
|
||||||
"htm": ["text/html", "text/plain"],
|
"htm": ["text/html", "text/plain"],
|
||||||
"ical": ["text/calendar"],
|
"ical": ["text/calendar"],
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
||||||
// when updating major/minor version number.
|
// when updating major/minor version number.
|
||||||
|
|
||||||
$OC_Version = array(12, 0, 0, 12);
|
$OC_Version = array(12, 0, 0, 13);
|
||||||
|
|
||||||
// The human readable string
|
// The human readable string
|
||||||
$OC_VersionString = '12.0 alpha';
|
$OC_VersionString = '12.0 alpha';
|
||||||
|
|
Loading…
Reference in a new issue