diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-02-10 14:03:06 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-02-10 14:03:06 +0100 |
commit | e6df86f4cb4b28c07804cb5748cf3d0679e58b25 (patch) | |
tree | c48fbfa525e6f914a38753c34ab9eeac55782c69 /lib/private/files | |
parent | 8ad3fc89bed6b52b0f40095834b3b61b36d7c71c (diff) | |
parent | 02bdb470498fb8b71f1bc582af2f55795a719c39 (diff) | |
download | nextcloud-server-e6df86f4cb4b28c07804cb5748cf3d0679e58b25.tar.gz nextcloud-server-e6df86f4cb4b28c07804cb5748cf3d0679e58b25.zip |
Merge branch 'master' into quota-space-root
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/type/detection.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/files/type/detection.php b/lib/private/files/type/detection.php index d7cc9ebbf4e..11e439032ce 100644 --- a/lib/private/files/type/detection.php +++ b/lib/private/files/type/detection.php @@ -72,11 +72,12 @@ class Detection { and function_exists('finfo_file') and $finfo = finfo_open(FILEINFO_MIME) ) { $info = @strtolower(finfo_file($finfo, $path)); + finfo_close($finfo); if ($info) { $mimeType = substr($info, 0, strpos($info, ';')); return empty($mimeType) ? 'application/octet-stream' : $mimeType; } - finfo_close($finfo); + } $isWrapped = (strpos($path, '://') !== false) and (substr($path, 0, 7) === 'file://'); if (!$isWrapped and $mimeType === 'application/octet-stream' && function_exists("mime_content_type")) { |