Fixed bug where custom decryption passwords would require 2 password prompts to decrypt

This commit is contained in:
David Sparer
2016-11-21 09:59:46 -07:00
parent b1c697ea09
commit 0b507cb66a

View File

@@ -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)