summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-03 07:46:12 +0000
committerGravatar Alan Fitton <ajf@eth0.org.uk>2011-10-03 07:46:12 +0000
commita9780439e066ea76d7b5aa6af66a8a539c59b0cf (patch)
tree5cbde63721e07e7498bf952ac25df2c92139207c /src/util.c
parent88499797cc64ae0e563ef978ca2e08f38c4a6051 (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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index df10d00..0d147bf 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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;