From 1d043194daee94cc488c7ed5f12f61d07ce4825b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 1 May 2011 00:56:04 +0200 Subject: [PATCH] Fallback to download URI if original is unset This happens for instance when saving a page. --- toolbars/midori-transferbar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]) {