mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
Convert the supplied MIME type to the DefIcons type *before* doing the comparison
svn path=/trunk/netsurf/; revision=12448
This commit is contained in:
parent
624af3890b
commit
9397f392c0
@ -529,13 +529,17 @@ bool ami_mime_compare(struct hlcache_handle *c, const char *type)
|
||||
bool ret = false;
|
||||
lwc_error lerror;
|
||||
lwc_string *filetype;
|
||||
lwc_string *mime_filetype;
|
||||
lwc_string *mime = content_get_mime_type(c);
|
||||
|
||||
if(ami_mime_to_filetype(mime, &mime_filetype, NULL) == NULL)
|
||||
return false;
|
||||
|
||||
lerror = lwc_intern_string(type, strlen(type), &filetype);
|
||||
if (lerror != lwc_error_ok)
|
||||
return false;
|
||||
|
||||
lerror = lwc_string_isequal(filetype, mime, &ret);
|
||||
lerror = lwc_string_isequal(filetype, mime_filetype, &ret);
|
||||
if (lerror != lwc_error_ok)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user