Ticket #1485296 (closed Patches: fixed)
mime type detection not perfect 8)
| Reported by: | arekm | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.2-beta |
| Component: | PHP backend | Version: | 0.2-alpha |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Continuation of #1485222 improvements.
Unfortunately in meantime the code was changed that if finfo_file() fails then whole detection fails :-/
Wouldn't be it better to fallback to other mime detection type in such case?... and if that fails fallback to unknown/unknown.
--- program/include/rcube_shared.inc.org 2008-08-27 14:23:03.814146425 +0200 +++ program/include/rcube_shared.inc 2008-08-27 14:24:23.362054805 +0200 @@ -569,7 +569,7 @@
finfo_close($finfo);
}
}
- else if (function_exists('mime_content_type')) { + if (!$mime_type && function_exists('mime_content_type')) {
$mime_type = mime_content_type($path);
}
