mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
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:
parent
841b458f7a
commit
0d04658544
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user