From 6acda8238776dad49f3404f495320be4dcb29c0b Mon Sep 17 00:00:00 2001 From: Nathanial Woolls Date: Tue, 13 Jan 2015 20:58:03 -0500 Subject: [PATCH] Trim trailing slashes when comparing pool URLs --- MultiMiner.UX/ViewModels/ApplicationViewModel.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MultiMiner.UX/ViewModels/ApplicationViewModel.cs b/MultiMiner.UX/ViewModels/ApplicationViewModel.cs index 7b1e39ebb..200b25ca4 100644 --- a/MultiMiner.UX/ViewModels/ApplicationViewModel.cs +++ b/MultiMiner.UX/ViewModels/ApplicationViewModel.cs @@ -2806,7 +2806,12 @@ private Coin CoinConfigurationForPoolUrl(string poolUrl) EngineConfiguration.CoinConfigurations .FirstOrDefault(cc => cc.Pools - .Any(p => String.Format("{0}:{1}", p.Host.ShortHostFromHost(), p.Port).Equals(poolUrl.ShortHostFromHost(), StringComparison.OrdinalIgnoreCase)) + .Any((p) => { + //trim trailing slashes + string configurationPool = String.Format("{0}:{1}", p.Host.ShortHostFromHost(), p.Port).TrimEnd('/'); + string comparisonPool = poolUrl.ShortHostFromHost().TrimEnd('/'); + return configurationPool.Equals(comparisonPool, StringComparison.OrdinalIgnoreCase); + }) ); return coinConfiguration;