From 68d13210bdfa4362b984a83795498ff2c764a52b Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Tue, 29 Oct 2013 13:29:35 +0100 Subject: [PATCH] Reset mimetype to application/octet-stream on empty reply from file command. --- lib/private/files/type/detection.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/files/type/detection.php b/lib/private/files/type/detection.php index d8a8338282..e84c63875c 100644 --- a/lib/private/files/type/detection.php +++ b/lib/private/files/type/detection.php @@ -93,6 +93,10 @@ class Detection { //trim the newline $mimeType = trim($reply); + if (empty($mimeType)) { + $mimeType = 'application/octet-stream'; + } + } return $mimeType; }