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/requests.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/requests.c')
-rw-r--r-- | src/requests.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/requests.c b/src/requests.c index fe3f90e..c1c58b0 100644 --- a/src/requests.c +++ b/src/requests.c @@ -214,7 +214,7 @@ JsonNode *torrent_add(gchar * target, gint flags) JsonNode *root; JsonObject *args; gboolean isMagnet = g_str_has_prefix(target, "magnet:"); - gboolean isUri = isMagnet || g_regex_match_simple ("^(([^:/?#]+):)?(//([^/?#]*))?", target, 0, 0); + gboolean isUri = isMagnet || is_url(target); gchar *encodedFile; if (!isUri && !g_file_test(target, G_FILE_TEST_IS_REGULAR)) |