]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return early if fileinfo is there.
authorAndreas Fischer <bantu@owncloud.com>
Tue, 29 Oct 2013 12:36:37 +0000 (13:36 +0100)
committerAndreas Fischer <bantu@owncloud.com>
Tue, 29 Oct 2013 12:48:30 +0000 (13:48 +0100)
lib/private/files/type/detection.php

index e84c63875c9dd6c604f30c3f8d257cd43224bd9b..d7cc9ebbf4e9a5cb905bf9b8f5e25a989d9c0986 100644 (file)
@@ -74,6 +74,7 @@ class Detection {
                        $info = @strtolower(finfo_file($finfo, $path));
                        if ($info) {
                                $mimeType = substr($info, 0, strpos($info, ';'));
+                               return empty($mimeType) ? 'application/octet-stream' : $mimeType;
                        }
                        finfo_close($finfo);
                }