From: Christian Dywan Date: Sat, 30 Apr 2011 22:56:04 +0000 (+0200) Subject: Fallback to download URI if original is unset X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d043194daee94cc488c7ed5f12f61d07ce4825b;p=midori Fallback to download URI if original is unset This happens for instance when saving a page. --- diff --git a/toolbars/midori-transferbar.c b/toolbars/midori-transferbar.c index 7b7ec3dc..1cf9f93a 100644 --- a/toolbars/midori-transferbar.c +++ b/toolbars/midori-transferbar.c @@ -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]) {