summaryrefslogtreecommitdiff
path: root/gtk/filetype.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-02-23 22:27:55 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-02-23 22:27:55 +0000
commit0231675abf3b467cff49d1976df882931d91019d (patch)
tree08756930c2008871cf5fd5bc0ce345411377cb57 /gtk/filetype.c
parentb49669d17e0c9dc70c775623d6cc1154619ff83b (diff)
downloadnetsurf-0231675abf3b467cff49d1976df882931d91019d.tar.gz
netsurf-0231675abf3b467cff49d1976df882931d91019d.tar.bz2
add resource handling
move gtk and framebuffer to use generic resource handling svn path=/trunk/netsurf/; revision=11772
Diffstat (limited to 'gtk/filetype.c')
-rw-r--r--gtk/filetype.c6
1 files changed, 6 insertions, 0 deletions
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";