summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-09-30 03:58:58 +0200
committerRobin Appelman <icewind@owncloud.com>2012-09-30 03:58:58 +0200
commit258782584e490b92ccfcf032921aa7062a28da9f (patch)
tree1f3b8686c838e1d0f9891b9118fc2458321e9ca8 /lib/helper.php
parentf8eebcbb011269a36fe4b10f21b73dec4b076bff (diff)
downloadnextcloud-server-258782584e490b92ccfcf032921aa7062a28da9f.tar.gz
nextcloud-server-258782584e490b92ccfcf032921aa7062a28da9f.zip
fix mimetype detection using the 'file' command in some edge cases
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 8e578735f4c..908a61b5a2d 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -370,6 +370,7 @@ class OC_Helper {
//trim the character set from the end of the response
$mimeType=substr($reply,0,strrpos($reply,' '));
+ $mimeType=substr($mimeType,0,strrpos($mimeType,"\n"));
//trim ;
if (strpos($mimeType, ';') !== false) {