Commit 86cf4e03 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Split on whitespace as well as semi-colons. Reports from FC6 users that

word documents have been detected as application/msword application/msword
parent 08bbc38d
......@@ -270,7 +270,7 @@ function get_mime_type($file) {
default :
$filepath = get_config('pathtofile');
if (!empty($filepath)) {
list($output,) = split(';', exec($filepath . ' -ib ' . escapeshellarg($file)));
list($output,) = preg_split('/[\s;]/', exec($filepath . ' -ib ' . escapeshellarg($file)));
return $output;
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment