Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/mRemoteNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiley McArdle <riley@glyff.net>2013-03-21 01:25:51 +0400
committerRiley McArdle <riley@glyff.net>2013-03-21 01:25:51 +0400
commit375e737f0299aca577d0d093498ebbf66f2c945e (patch)
tree9df3c2ec6c670277f15683be3379abba3afe56ae
parent1032801f12f1fc511def796b81ebd924a9f5c7d8 (diff)
Fix PuTTY saved sessions with spaces or special characters not being listed.1.71Beta3
-rw-r--r--CHANGELOG.TXT1
-rw-r--r--mRemoteV1/Config/PuttySessions.vb16
2 files changed, 12 insertions, 5 deletions
diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index 9c6fab6d..87f676ad 100644
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -7,6 +7,7 @@
Fixed issue MR-413 - Can't use aplication
Fixed new connections having a globe icon.
Fixed the category names in the themes tab of the options dialog on Windows XP not showing correctly.
+ Fixed PuTTY saved sessions with spaces or special characters not being listed.
1.71 Beta 2 (2013-03-19):
Added feature MR-336 - Customizable background color for the windows/panels
diff --git a/mRemoteV1/Config/PuttySessions.vb b/mRemoteV1/Config/PuttySessions.vb
index e203818c..402cd7f7 100644
--- a/mRemoteV1/Config/PuttySessions.vb
+++ b/mRemoteV1/Config/PuttySessions.vb
@@ -55,14 +55,18 @@ Namespace Config
treeView.EndUpdate()
End Sub
- Protected Shared Function GetSessionNames(Optional ByVal addDefaultSettings As Boolean = False) As String()
+ Protected Shared Function GetSessionNames(Optional ByVal raw As Boolean = False) As String()
Dim sessionsKey As RegistryKey = Registry.CurrentUser.OpenSubKey(PuttySessionsKey)
If sessionsKey Is Nothing Then Return New String() {}
Dim sessionNames As New List(Of String)
- If addDefaultSettings Then sessionNames.Add("Default Settings")
+ If Not raw Then sessionNames.Add("Default Settings") ' Do not localize
For Each sessionName As String In sessionsKey.GetSubKeyNames()
- sessionNames.Add(Web.HttpUtility.UrlDecode(sessionName))
+ If raw Then
+ sessionNames.Add(sessionName)
+ Else
+ sessionNames.Add(Web.HttpUtility.UrlDecode(sessionName))
+ End If
Next
Return sessionNames.ToArray()
End Function
@@ -70,7 +74,7 @@ Namespace Config
Protected Shared Function LoadSessions() As Connection.PuttySession.Info()
Dim sessionList As New List(Of Connection.PuttySession.Info)
Dim sessionInfo As Connection.Info
- For Each sessionName As String In GetSessionNames()
+ For Each sessionName As String In GetSessionNames(True)
sessionInfo = SessionToConnectionInfo(sessionName)
If sessionInfo Is Nothing Then Continue For
sessionList.Add(sessionInfo)
@@ -85,6 +89,8 @@ Namespace Config
Dim sessionKey As RegistryKey = sessionsKey.OpenSubKey(sessionName)
If sessionKey Is Nothing Then Return Nothing
+ sessionName = Web.HttpUtility.UrlDecode(sessionName)
+
Dim sessionInfo As New Connection.PuttySession.Info
With sessionInfo
.PuttySession = sessionName
@@ -122,7 +128,7 @@ Namespace Config
Public Shared ReadOnly Property Names() As String()
Get
- Return GetSessionNames(True)
+ Return GetSessionNames()
End Get
End Property