Minor restore fixes

This commit is contained in:
Michael J. Seiferling
2016-03-03 19:28:04 -06:00
parent 163b6cd3a0
commit 321c72b6bf
2 changed files with 17 additions and 9 deletions
+5 -1
View File
@@ -41,7 +41,11 @@
Property FileName As String Property FileName As String
Get Get
Return sFileName If mgrCommon.IsUnix Then
Return sFileName.Replace("\", "/")
Else
Return sFileName.Replace("/", "\")
End If
End Get End Get
Set(value As String) Set(value As String)
sFileName = value sFileName = value
+12 -8
View File
@@ -232,7 +232,11 @@ Public Class mgrRestore
If bDoRestore Then If bDoRestore Then
Try Try
If File.Exists(sBackupFile) Then If File.Exists(sBackupFile) Then
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r" If mgrCommon.IsUnix Then
prs7z.StartInfo.Arguments = "x """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
Else
prs7z.StartInfo.Arguments = "x -bb1 -bt """ & sBackupFile & """ -o""" & sExtractPath & Path.DirectorySeparatorChar & """ -aoa -r"
End If
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
prs7z.StartInfo.UseShellExecute = False prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True prs7z.StartInfo.RedirectStandardOutput = True
@@ -262,14 +266,14 @@ Public Class mgrRestore
RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True) RaiseEvent UpdateLog(mgrRestore_ErrorNoBackup, True, ToolTipIcon.Error, True)
End If End If
If bRestoreCompleted Then If bRestoreCompleted Then
'Save Local Manifest 'Save Local Manifest
If mgrManifest.DoManifestCheck(oBackupInfo.Name, mgrSQLite.Database.Local) Then If mgrManifest.DoManifestCheck(oBackupInfo.Name, mgrSQLite.Database.Local) Then
mgrManifest.DoManifestUpdate(oBackupInfo, mgrSQLite.Database.Local) mgrManifest.DoManifestUpdate(oBackupInfo, mgrSQLite.Database.Local)
Else Else
mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local) mgrManifest.DoManifestAdd(oBackupInfo, mgrSQLite.Database.Local)
End If
End If End If
End If
Catch ex As Exception Catch ex As Exception
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True) RaiseEvent UpdateLog(mgrCommon.FormatString(mgrRestore_ErrorOtherFailure, ex.Message), False, ToolTipIcon.Error, True)
End Try End Try