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

View File

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