summaryrefslogtreecommitdiff
path: root/amiga/filetype.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2008-11-16 23:29:40 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2008-11-16 23:29:40 +0000
commitd508def2d677ab41e32dde4b7b214852f10f08a4 (patch)
treed0f89ff7d454c6d94c30da932c698288fb4b2ad2 /amiga/filetype.c
parent17bc053fbfba41ea091de7b47a662d5784e1c473 (diff)
downloadnetsurf-d508def2d677ab41e32dde4b7b214852f10f08a4.tar.gz
netsurf-d508def2d677ab41e32dde4b7b214852f10f08a4.tar.bz2
HTML files with an icon but no MIMETYPE tooltype were being picked up by the
simplehtml datatype. As I'm using dth_BaseName rather than dth_Name, they were being tagged with the MIME type text/simplehtml. Have made an exception for this case to translate it to text/html, may in the future consider whether using dth_Name may be better. Minor adjustments to the local file requester to prevent .info files from being displayed. svn path=/trunk/netsurf/; revision=5711
Diffstat (limited to 'amiga/filetype.c')
-rw-r--r--amiga/filetype.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/amiga/filetype.c b/amiga/filetype.c
index eec0fdd35..bc742c579 100644
--- a/amiga/filetype.c
+++ b/amiga/filetype.c
@@ -79,6 +79,10 @@ const char *fetch_filetype(const char *unix_path)
{
sprintf(mimetype,"text/plain",dth->dth_BaseName);
}
+ else if(strcmp("simplehtml",dth->dth_BaseName)==0)
+ {
+ sprintf(mimetype,"text/html",dth->dth_BaseName);
+ }
else
{
sprintf(mimetype,"text/%s",dth->dth_BaseName);
@@ -106,6 +110,8 @@ const char *fetch_filetype(const char *unix_path)
if(!found) strcpy(mimetype,"text/html"); /* If all else fails */
+ //printf("%s: %s\n",unix_path,mimetype);
+
return mimetype;
}