[banshee/stable-2.6] Podcasting: improve previous fix to not show the tweaked URL (bgo#729193)



commit 3e0c6c6643bb706486f8c69f5c4a995dba23d419
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Mon Dec 15 02:17:57 2014 +0100

    Podcasting: improve previous fix to not show the tweaked URL (bgo#729193)
    
    The problem with previous fix was this: let's say the user tries
    to add the URL for a podcast like this: ftp://mikrowelle.me/opus.xml.
    As you can see, this URL already has a protocol, and what happens is
    that the FTP access for that site is closed, so then banshee considers
    it as not parseable, and with the previous fix, banshee would test
    the URL "http://ftp://mikrowelle.me/opus.xml";, and then it would
    tell the user that there was a problem when parsing that last URL.
    
    The way to fix this is to not overwrite the feedUri variable in the
    second call to TryParseUrl(), so that, if an error has to be shown,
    it will be about the URL that the user entered, not the tweaked one.

 .../Banshee.Podcasting.Gui/PodcastActions.cs       |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs 
b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
index 4e19d29..3e8c5b1 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
@@ -341,7 +341,8 @@ namespace Banshee.Podcasting.Gui
                 return;
             }
 
-            if (!TryParseUrl (url, out feedUri) && !TryParseUrl ("http://"; + url, out feedUri)) {
+            Uri tweaked_feed_uri;
+            if (!TryParseUrl (url, out feedUri) && !TryParseUrl ("http://"; + url, out tweaked_feed_uri)) {
                 HigMessageDialog.RunHigMessageDialog (
                     null,
                     DialogFlags.Modal,


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