When fetching a local file of type data, examine the extension to determine mime type.

svn path=/trunk/netsurf/; revision=11123
This commit is contained in:
Michael Drake 2010-12-27 14:03:45 +00:00
parent 841b458f7a
commit 0d04658544
1 changed files with 3 additions and 3 deletions

View File

@ -106,9 +106,9 @@ const char *fetch_filetype(const char *unix_path)
return (const char *)type_buf;
}
/* If filetype is text and the file has an extension, try to map the
* extension to a filetype via the MimeMap file. */
if (file_type == osfile_TYPE_TEXT) {
/* If filetype is text or data, and the file has an extension, try to
* map the extension to a filetype via the MimeMap file. */
if (file_type == osfile_TYPE_TEXT || file_type == osfile_TYPE_DATA) {
slash = strrchr(path, '/');
if (slash) {
error = xmimemaptranslate_extension_to_filetype(