From 99f3638fbf991e165b5b5e5ae1e2def98207cdba Mon Sep 17 00:00:00 2001 From: Riley McArdle Date: Thu, 12 May 2011 19:15:59 -0500 Subject: [PATCH] Do not migrate files from Local to Roaming folder in portable version. --- mRemoteV1/App/App.Runtime.vb | 8 +++++--- mRemoteV1/Config/Config.Settings.Load.vb | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mRemoteV1/App/App.Runtime.vb b/mRemoteV1/App/App.Runtime.vb index b9552c1f..3e2b0f5f 100644 --- a/mRemoteV1/App/App.Runtime.vb +++ b/mRemoteV1/App/App.Runtime.vb @@ -786,10 +786,12 @@ Namespace App If My.Settings.LoadConsFromCustomLocation = False Then 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 + If File.Exists(newPath) Then conL.ConnectionFileName = newPath +#If Not PORTABLE Then + Else If File.Exists(oldPath) Then + conL.ConnectionFileName = oldPath +#End If End If Else conL.ConnectionFileName = My.Settings.CustomConsPath diff --git a/mRemoteV1/Config/Config.Settings.Load.vb b/mRemoteV1/Config/Config.Settings.Load.vb index 48100203..777ad201 100644 --- a/mRemoteV1/Config/Config.Settings.Load.vb +++ b/mRemoteV1/Config/Config.Settings.Load.vb @@ -165,8 +165,10 @@ Namespace Config Dim newPath As String = App.Info.Settings.SettingsPath & "\" & App.Info.Settings.LayoutFileName If File.Exists(newPath) Then .pnlDock.LoadFromXml(newPath, AddressOf GetContentFromPersistString) +#If Not PORTABLE Then ElseIf File.Exists(oldPath) Then .pnlDock.LoadFromXml(oldPath, AddressOf GetContentFromPersistString) +#End If Else Startup.SetDefaultLayout() End If @@ -183,8 +185,10 @@ Namespace Config Dim xDom As New XmlDocument() If File.Exists(newPath) Then xDom.Load(newPath) +#If Not PORTABLE Then ElseIf File.Exists(oldPath) Then xDom.Load(oldPath) +#End If Else Exit Sub End If