[epiphany/gnome-3-22] download-widget: Decode display URI in the right place



commit d67ea2e37c91b281ac4aa8da0911319345d2dd67
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 93b6d1b..a6e2242 100644
--- a/lib/widgets/ephy-download-widget.c
+++ b/lib/widgets/ephy-download-widget.c
@@ -66,11 +66,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]