]> spindle.queued.net Git - midori/commitdiff
Fallback to download URI if original is unset
authorChristian Dywan <christian@twotoasts.de>
Sat, 30 Apr 2011 22:56:04 +0000 (00:56 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sat, 30 Apr 2011 22:56:04 +0000 (00:56 +0200)
This happens for instance when saving a page.

toolbars/midori-transferbar.c

index 7b7ec3dce9626650dc1df2ad5fdde1bf82e28f1b..1cf9f93acd930a4c8db0473ee97061810d54d336 100644 (file)
@@ -140,9 +140,9 @@ midori_transferbar_download_notify_status_cb (WebKitDownload* download,
             #if WEBKIT_CHECK_VERSION (1, 1, 14)
             request = webkit_download_get_network_request (download);
             original_uri = g_object_get_data (G_OBJECT (request), "midori-original-uri");
-            #else
-            original_uri = webkit_download_get_uri (download);
+            if (!original_uri)
             #endif
+                original_uri = webkit_download_get_uri (download);
             fingerprint = g_strsplit (original_uri, "#!md5!", 2);
             if (fingerprint && fingerprint[0] && fingerprint[1])
             {