From 0231675abf3b467cff49d1976df882931d91019d Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 23 Feb 2011 22:27:55 +0000 Subject: add resource handling move gtk and framebuffer to use generic resource handling svn path=/trunk/netsurf/; revision=11772 --- gtk/filetype.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gtk/filetype.c') diff --git a/gtk/filetype.c b/gtk/filetype.c index b172f5191..f89f2358c 100644 --- a/gtk/filetype.c +++ b/gtk/filetype.c @@ -155,11 +155,17 @@ const char *fetch_filetype(const char *unix_path) const char *ptr; char *lowerchar; const char *type; + int l; stat(unix_path, &statbuf); if (S_ISDIR(statbuf.st_mode)) return "application/x-netsurf-directory"; + l = strlen(unix_path); + if ((3 < l) && (strcasecmp(unix_path + l - 4, ",f79") == 0)) { + return "text/css"; + } + if (strchr(unix_path, '.') == NULL) { /* no extension anywhere! */ return "text/plain"; -- cgit v1.2.3