From 0b507cb66aa36394e276b65e9647ce11d3c5716f Mon Sep 17 00:00:00 2001 From: David Sparer Date: Mon, 21 Nov 2016 09:59:46 -0700 Subject: [PATCH] Fixed bug where custom decryption passwords would require 2 password prompts to decrypt --- .../Config/Serializers/XmlConnectionsDeserializer.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/mRemoteV1/Config/Serializers/XmlConnectionsDeserializer.cs b/mRemoteV1/Config/Serializers/XmlConnectionsDeserializer.cs index 7f210070..05dd4ab0 100644 --- a/mRemoteV1/Config/Serializers/XmlConnectionsDeserializer.cs +++ b/mRemoteV1/Config/Serializers/XmlConnectionsDeserializer.cs @@ -91,7 +91,7 @@ namespace mRemoteNG.Config.Serializers Runtime.IsConnectionsFileLoaded = false; var rootXmlElement = _xmlDocument.DocumentElement; - _rootNodeInfo = InitializeRootNode(rootXmlElement); + InitializeRootNode(rootXmlElement); CreateDecryptor(_rootNodeInfo, rootXmlElement); var connectionTreeModel = new ConnectionTreeModel(); connectionTreeModel.AddRootNode(_rootNodeInfo); @@ -138,14 +138,10 @@ namespace mRemoteNG.Config.Serializers } } - private RootNodeInfo InitializeRootNode(XmlElement connectionsRootElement) + private void InitializeRootNode(XmlElement connectionsRootElement) { var rootNodeName = connectionsRootElement?.Attributes["Name"].Value.Trim(); - var rootInfo = new RootNodeInfo(RootNodeType.Connection) - { - Name = rootNodeName - }; - return rootInfo; + _rootNodeInfo.Name = rootNodeName; } private void CreateDecryptor(RootNodeInfo rootNodeInfo, XmlElement connectionsRootElement = null)