aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-02-13 18:09:12 -0600
committerGitHub <noreply@github.com>2017-02-13 18:09:12 -0600
commit69c9ca4522f6becf4db43e9a4ae9622cf2c95da9 (patch)
treeacb2c8bd2595391cfe11e189cbe6fee1ee34c6f3 /lib
parent5b9f96a4340f9f0fc4fe445223dbdf42048bc43c (diff)
parentade91c8fe2e9230dea62cbf47a19cd5907646864 (diff)
downloadnextcloud-server-69c9ca4522f6becf4db43e9a4ae9622cf2c95da9.tar.gz
nextcloud-server-69c9ca4522f6becf4db43e9a4ae9622cf2c95da9.zip
Merge pull request #3444 from nextcloud/recognize-bat-and-cmd
Recognize .bat and .cmd files
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Repair/RepairMimeTypes.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php
index 86427af4c47..fbf446a681c 100644
--- a/lib/private/Repair/RepairMimeTypes.php
+++ b/lib/private/Repair/RepairMimeTypes.php
@@ -308,6 +308,16 @@ class RepairMimeTypes implements IRepairStep {
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
*/
@@ -377,5 +387,9 @@ class RepairMimeTypes implements IRepairStep {
$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');
+ }
}
}