diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-10 10:27:21 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-10 10:27:21 +0100 |
commit | 8de9758fee8e943331400513367e9e9eeb6858b4 (patch) | |
tree | b137305e608788469d5cc1b10b3c33f0210dd03a | |
parent | e7db48cd7f7190e2d9a256557f0b1215a8c4324a (diff) | |
parent | 11f46e121caa30f46250a1980e315520d68eb593 (diff) | |
download | nextcloud-server-8de9758fee8e943331400513367e9e9eeb6858b4.tar.gz nextcloud-server-8de9758fee8e943331400513367e9e9eeb6858b4.zip |
Merge pull request #7071 from jcfischer/master
close statement in MimeType detection is executed [#7069]
-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")) { |