summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@gnome.org>2016-12-28 17:32:58 -0600
committerMichael Catanzaro <mcatanzaro@gnome.org>2016-12-28 17:32:58 -0600
commit0e3a2a25e964b94cc73738b879dc2d9becaaafcb (patch)
tree7213f96c8a930c487426d8da6ff3ef7d46aae918
parenta720861364609bef172961cd7e99267a6fcf7f15 (diff)
downloadepiphany-0e3a2a25e964b94cc73738b879dc2d9becaaafcb.tar.gz
download-widget: Decode display URI in the right place
This needs to happen before finding the basename, not after, because a basename is not a valid URI to pass to a URI decoding function.
-rw-r--r--lib/widgets/ephy-download-widget.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 659675fd8..36312734d 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -64,11 +64,11 @@ get_destination_basename_from_download (EphyDownload *ephy_download)
if (!dest)
return NULL;
- basename = g_filename_display_basename (dest);
- decoded = ephy_uri_decode (basename);
- g_free (basename);
+ decoded = ephy_uri_decode (dest);
+ basename = g_filename_display_basename (decoded);
+ g_free (decoded);
- return decoded;
+ return basename;
}
/* modified from telepathy-account-widgets/tpaw-time.c */