]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix mimetype detection using the 'file' command in some edge cases
authorRobin Appelman <icewind@owncloud.com>
Sun, 30 Sep 2012 01:58:58 +0000 (03:58 +0200)
committerRobin Appelman <icewind@owncloud.com>
Sun, 30 Sep 2012 01:58:58 +0000 (03:58 +0200)
lib/helper.php

index 8e578735f4ca58e1fcae4df87e2bb22638b181a7..908a61b5a2d953becff25d338b98e506cf7853fb 100644 (file)
@@ -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) {