From fae284ca86fd7652fae435a302363c7ae17f860f Mon Sep 17 00:00:00 2001 From: Riley McArdle Date: Thu, 12 May 2011 17:31:55 -0500 Subject: [PATCH] Safer migration of connections file from Local to Roaming folder. --- mRemoteV1/App/App.Runtime.vb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mRemoteV1/App/App.Runtime.vb b/mRemoteV1/App/App.Runtime.vb index 16bd27f37..4210aea71 100644 --- a/mRemoteV1/App/App.Runtime.vb +++ b/mRemoteV1/App/App.Runtime.vb @@ -4,6 +4,7 @@ Imports Crownwood Imports System.Threading Imports System.Xml Imports mRemoteNG.App.Native +Imports System.Environment Namespace App Public Class Runtime @@ -784,6 +785,13 @@ Namespace App Else If My.Settings.LoadConsFromCustomLocation = False Then conL.ConnectionFileName = App.Info.Connections.DefaultConnectionsPath & "\" & App.Info.Connections.DefaultConnectionsFile + Dim oldPath As String = GetFolderPath(SpecialFolder.LocalApplicationData) & "\" & My.Application.Info.ProductName & "\" & App.Info.Connections.DefaultConnectionsFile + Dim newPath As String = App.Info.Connections.DefaultConnectionsPath & "\" & App.Info.Connections.DefaultConnectionsFile + If Not File.Exists(newPath) And File.Exists(oldPath) Then + conL.ConnectionFileName = oldPath + Else + conL.ConnectionFileName = newPath + End If Else conL.ConnectionFileName = My.Settings.CustomConsPath End If