Merge branch '442_fix_importing_putty_session_with_spaces_in_name' into hotfix5

This commit is contained in:
David Sparer
2017-04-20 09:17:22 -06:00
3 changed files with 5 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ Fixes:
------
#410: Update PuTTYNG to 0.68
#434: Fix complier warnings CA1049 & CA2111
#442: Fixed issue loading PuTTY sessions that have spaces in the name
#502: Problems with ParentID for Duplicated Containers/Connections with SQL Connection Storage
#514: Expanded property not saved/loaded properly from SQL
#518: Exception when Importing File

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using mRemoteNG.Connection;
using mRemoteNG.Tree.Root;
@@ -42,7 +43,8 @@ namespace mRemoteNG.Config.Putty
private IEnumerable<PuttySessionInfo> GetSessionToRemove(IEnumerable<string> sessionNamesFromProvider)
{
var currentlyKnownSessionNames = Sessions.Select(session => session.Name);
var sessionNamesToRemove = currentlyKnownSessionNames.Except(sessionNamesFromProvider);
var normalizedSessionNames = sessionNamesFromProvider.Select(HttpUtility.UrlDecode);
var sessionNamesToRemove = currentlyKnownSessionNames.Except(normalizedSessionNames);
return Sessions.Where(session => sessionNamesToRemove.Contains(session.Name));
}

View File

@@ -31,7 +31,7 @@ namespace mRemoteNG.Config.Putty
if (raw && !sessionNames.Contains("Default%20Settings"))
sessionNames.Insert(0, "Default%20Settings");
else if (!sessionNames.Contains("Default Settings"))
else if (!raw && !sessionNames.Contains("Default Settings"))
sessionNames.Insert(0, "Default Settings");
return sessionNames.ToArray();