]> spindle.queued.net Git - midori/commitdiff
Don't bother with adblocked items when saving pages with resources
authorPaweł Forysiuk <tuxator@o2.pl>
Tue, 24 Jul 2012 20:12:40 +0000 (22:12 +0200)
committerChristian Dywan <christian@twotoasts.de>
Tue, 24 Jul 2012 21:16:50 +0000 (23:16 +0200)
midori/midori-browser.c

index 62d5061aea4a2f89d5f40c5ca3b2f65866be653f..5115bcf4501e0e5a928550fadb26d9dda225890c 100644 (file)
@@ -1073,6 +1073,11 @@ midori_browser_save_resources (MidoriView*  view,
     {
         WebKitWebResource* resource = WEBKIT_WEB_RESOURCE (list->data);
         GString* data = webkit_web_resource_get_data (resource);
+
+        /* Resource could be adblocked, skip it in that case */
+        if (!g_strcmp0 (webkit_web_resource_get_uri (resource), "about:blank"))
+            continue;
+
         /* FIXME: mime type fallback should respect the resource's type */
         gchar* sub_filename = midori_browser_get_filename_suggestion_for_uri (
             view, webkit_web_resource_get_uri (resource));