OS specific 7za argument handler

This commit is contained in:
Michael J. Seiferling
2016-03-02 10:32:04 -06:00
parent 430e1171fb
commit b03545d86f
+8 -4
View File
@@ -168,9 +168,13 @@ Public Class mgrBackup
End If
If Directory.Exists(sSavePath) Then
'prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
prs7z.StartInfo.Arguments = "a -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
'The Linux version of 7za doesn't support the new verbose parameters and fails out. Just split this up for now until we have a better solution.
If mgrCommon.IsUnix Then
prs7z.StartInfo.Arguments = "a -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
Else
prs7z.StartInfo.Arguments = "a -bb1 -bt -t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
End If
prs7z.StartInfo.FileName = mgrPath.Utility7zLocation
prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True
prs7z.StartInfo.CreateNoWindow = True
@@ -204,7 +208,7 @@ Public Class mgrBackup
If bBackupCompleted Then
If oSettings.CheckSum Then
RaiseEvent UpdateLog(mgrCommon.FormatString(mgrBackup_GenerateHash, oGame.Name), False, ToolTipIcon.Info, True)
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
sHash = mgrHash.Generate_SHA256_Hash(sBackupFile)
End If
If Not DoManifestUpdate(oGame, sBackupFile, dTimeStamp, sHash) Then