[epiphany] download-widget: Decode display URI in the right place



commit 0e3a2a25e964b94cc73738b879dc2d9becaaafcb
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Wed Dec 28 17:32:58 2016 -0600

    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.

 lib/widgets/ephy-download-widget.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/widgets/ephy-download-widget.c b/lib/widgets/ephy-download-widget.c
index 659675f..3631273 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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]