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



commit 5673e5a8f20f2c0d11fa5ba012a1e0c190ea0c43
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 e7c5591..e6f28e5 100644
--- a/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
+++ b/src/Extensions/Banshee.Podcasting/Banshee.Podcasting.Gui/PodcastActions.cs
@@ -343,7 +343,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]