diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-10-03 07:46:12 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-10-03 07:46:12 +0000 |
commit | a9780439e066ea76d7b5aa6af66a8a539c59b0cf (patch) | |
tree | 5cbde63721e07e7498bf952ac25df2c92139207c /src/util.c | |
parent | 88499797cc64ae0e563ef978ca2e08f38c4a6051 (diff) |
issue 145 - fix my broken regex which was causing filenames to be treated as URLs. issue 141 - patch for showing mime type icons in file list.
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -33,6 +33,12 @@ #include "util.h" +gboolean is_url(gchar *string) +{ + //return g_regex_match_simple ("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?", string, 0, 0); + return g_regex_match_simple ("^http", string, 0, 0); +} + void add_file_id_to_array(JsonObject * args, gchar * key, gint index) { JsonArray *array; |