mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge branch '442_fix_importing_putty_session_with_spaces_in_name' into hotfix5
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user