summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@owncloud.com>2013-10-29 13:36:37 +0100
committerAndreas Fischer <bantu@owncloud.com>2013-10-29 13:48:30 +0100
commitfa6ae81149974d8becc58903d6c63594ed8b5cb4 (patch)
treec2e616ef2444a706cd4c53a400427c2c22a425dc /lib
parent68d13210bdfa4362b984a83795498ff2c764a52b (diff)
downloadnextcloud-server-fa6ae81149974d8becc58903d6c63594ed8b5cb4.tar.gz
nextcloud-server-fa6ae81149974d8becc58903d6c63594ed8b5cb4.zip
Return early if fileinfo is there.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/type/detection.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/files/type/detection.php b/lib/private/files/type/detection.php
index e84c63875c9..d7cc9ebbf4e 100644
--- a/lib/private/files/type/detection.php
+++ b/lib/private/files/type/detection.php
@@ -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);
}