]> Pileus Git - grits/commitdiff
Fix gis_http_available bugs
authorAndy Spencer <andy753421@gmail.com>
Mon, 26 Apr 2010 04:49:44 +0000 (04:49 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 26 Apr 2010 04:49:44 +0000 (04:49 +0000)
- Used wrong RE
- Used wrong subexpression reference

src/data/gis-http.c

index d01701342f9d4fc507d1e4e4844a6b4a9d8c0850..613dd439fa7ce38f7c55486415cf5a1a8cc8d15a 100644 (file)
@@ -233,9 +233,9 @@ GList *gis_http_available(GisHttp *http,
                GRegex *extract_re = g_regex_new(
                                extract ?: "href=\"([^\"]*)\"", 0, 0, NULL);
                GMatchInfo *info;
-               g_regex_match(filter_re, html, 0, &info);
+               g_regex_match(extract_re, html, 0, &info);
                while (g_match_info_matches(info)) {
-                       gchar *file = g_match_info_fetch(info, 0);
+                       gchar *file = g_match_info_fetch(info, 1);
                        if (g_regex_match(filter_re, file, 0, NULL))
                                files = g_list_prepend(files, file);
                        else