+18
-13
@@ -401,20 +401,20 @@ Public Class frmGameManager
|
||||
End Sub
|
||||
|
||||
Private Sub OpenBackupFile()
|
||||
'Unix Hanlder
|
||||
If Not mgrCommon.IsUnix Then
|
||||
Dim sFileName As String
|
||||
Dim oProcessStartInfo As ProcessStartInfo
|
||||
|
||||
sFileName = BackupFolder & CurrentBackupItem.FileName
|
||||
|
||||
If File.Exists(sFileName) Then
|
||||
Process.Start("explorer.exe", "/select," & sFileName)
|
||||
oProcessStartInfo = New ProcessStartInfo
|
||||
oProcessStartInfo.FileName = sFileName
|
||||
oProcessStartInfo.UseShellExecute = True
|
||||
oProcessStartInfo.Verb = "open"
|
||||
Process.Start(oProcessStartInfo)
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoBackupExists, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateBuilderButtonLabel(ByVal sBuilderString As String, ByVal sLabel As String, ByVal btn As Button, ByVal bDirty As Boolean)
|
||||
@@ -488,8 +488,8 @@ Public Class frmGameManager
|
||||
End Function
|
||||
|
||||
Private Sub OpenRestorePath()
|
||||
If Not mgrCommon.IsUnix Then
|
||||
Dim sPath As String = String.Empty
|
||||
Dim oProcessStartInfo As ProcessStartInfo
|
||||
|
||||
If CurrentBackupItem.AbsolutePath Then
|
||||
sPath = CurrentBackupItem.RestorePath
|
||||
@@ -500,13 +500,14 @@ Public Class frmGameManager
|
||||
End If
|
||||
|
||||
If Directory.Exists(sPath) Then
|
||||
Process.Start("explorer.exe", sPath)
|
||||
oProcessStartInfo = New ProcessStartInfo
|
||||
oProcessStartInfo.FileName = sPath
|
||||
oProcessStartInfo.UseShellExecute = True
|
||||
oProcessStartInfo.Verb = "open"
|
||||
Process.Start(oProcessStartInfo)
|
||||
Else
|
||||
mgrCommon.ShowMessage(frmGameManager_ErrorNoRestorePathExists, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
Else
|
||||
mgrCommon.ShowMessage(App_ErrorUnixNotAvailable, MsgBoxStyle.Exclamation)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OpenTags()
|
||||
@@ -540,7 +541,6 @@ Public Class frmGameManager
|
||||
Dim oBackupInfo As clsBackup
|
||||
Dim sFileName As String
|
||||
|
||||
|
||||
If oRemoteBackupData.Contains(oApp.Name) Then
|
||||
CurrentBackupItem = DirectCast(oRemoteBackupData(oApp.Name), clsBackup)
|
||||
txtCurrentBackup.Text = mgrCommon.FormatString(frmGameManager_BackupTimeAndName, New String() {CurrentBackupItem.DateUpdated, CurrentBackupItem.UpdatedBy})
|
||||
@@ -556,7 +556,12 @@ Public Class frmGameManager
|
||||
Else
|
||||
txtFileSize.Text = frmGameManager_ErrorNoBackupExists
|
||||
End If
|
||||
|
||||
If oApp.Temporary Then
|
||||
txtRestorePath.Text = CurrentBackupItem.RestorePath
|
||||
Else
|
||||
txtRestorePath.Text = oApp.Path
|
||||
End If
|
||||
Else
|
||||
txtCurrentBackup.Text = frmGameManager_Never
|
||||
txtFileSize.Text = String.Empty
|
||||
|
||||
@@ -28,35 +28,24 @@ Public Class mgrRestore
|
||||
Public Event UpdateRestoreInfo(oRestoreInfo As clsBackup)
|
||||
Public Event SetLastAction(sMessage As String)
|
||||
|
||||
Private Shared Function CheckForPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame) As Boolean
|
||||
Dim oResult As MsgBoxResult
|
||||
|
||||
If oCheckBackup.RestorePath <> oCheckGame.Path Then
|
||||
oResult = mgrCommon.ShowMessage(mgrRestore_ConfirmPathMismatch, oCheckBackup.CroppedName, MsgBoxStyle.YesNoCancel)
|
||||
If oResult = MsgBoxResult.Yes Then
|
||||
Private Shared Sub DoPathOverride(ByRef oCheckBackup As clsBackup, ByVal oCheckGame As clsGame)
|
||||
'Always override the manifest restore path with the current configuration path if possible
|
||||
If Not oCheckGame.Temporary Then
|
||||
If Path.IsPathRooted(oCheckGame.Path) Then
|
||||
oCheckBackup.AbsolutePath = True
|
||||
oCheckBackup.RestorePath = oCheckGame.Path
|
||||
Else
|
||||
oCheckBackup.RestorePath = oCheckGame.Path
|
||||
End If
|
||||
ElseIf oResult = MsgBoxResult.Cancel Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
|
||||
Return True
|
||||
End Function
|
||||
End Sub
|
||||
|
||||
Public Shared Function CheckPath(ByRef oRestoreInfo As clsBackup, ByVal oGame As clsGame, ByRef bTriggerReload As Boolean) As Boolean
|
||||
Dim sProcess As String
|
||||
Dim sRestorePath As String
|
||||
Dim bNoAuto As Boolean
|
||||
|
||||
'Before we do anything check if we need to override the current path
|
||||
If Not CheckForPathOverride(oRestoreInfo, oGame) Then
|
||||
Return False
|
||||
End If
|
||||
DoPathOverride(oRestoreInfo, oGame)
|
||||
|
||||
If Not oRestoreInfo.AbsolutePath Then
|
||||
If oGame.ProcessPath <> String.Empty Then
|
||||
|
||||
Reference in New Issue
Block a user