Fix #164, allow paths in include list

This commit is contained in:
Sebastian Riedel
2018-10-11 20:57:41 +02:00
parent 376c1ad418
commit 02a4a72409
+6 -5
View File
@@ -66,7 +66,7 @@ Public Class mgrBackup
Return True Return True
End Function End Function
Private Sub BuildFileList(ByVal sBackupPath As String, ByVal sList As String, ByVal sPath As String) Private Sub BuildFileList(ByVal sList As String, ByVal sPath As String)
Dim oStream As StreamWriter Dim oStream As StreamWriter
Try Try
@@ -75,7 +75,7 @@ Public Class mgrBackup
Using oStream Using oStream
If sList <> String.Empty Then If sList <> String.Empty Then
For Each sTypeItem As String In sList.Split(":") For Each sTypeItem As String In sList.Split(":")
oStream.WriteLine("""" & sBackupPath & Path.DirectorySeparatorChar & sTypeItem & """") oStream.WriteLine("""" & sTypeItem & """")
Next Next
End If End If
oStream.Flush() oStream.Flush()
@@ -314,12 +314,12 @@ Public Class mgrBackup
sSavePath = VerifySavePath(oGame) sSavePath = VerifySavePath(oGame)
If oGame.FolderSave = True Then If oGame.FolderSave = True Then
BuildFileList(sSavePath, "*", mgrPath.IncludeFileLocation) BuildFileList("*", mgrPath.IncludeFileLocation)
Else Else
BuildFileList(sSavePath, oGame.FileType, mgrPath.IncludeFileLocation) BuildFileList(oGame.FileType, mgrPath.IncludeFileLocation)
End If End If
BuildFileList(sSavePath, oGame.ExcludeList, mgrPath.ExcludeFileLocation) BuildFileList(oGame.ExcludeList, mgrPath.ExcludeFileLocation)
Try Try
If Directory.Exists(sSavePath) Then If Directory.Exists(sSavePath) Then
@@ -332,6 +332,7 @@ Public Class mgrBackup
prs7z.StartInfo.Arguments = "a" & oSettings.Prepared7zArguments & "-t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r" prs7z.StartInfo.Arguments = "a" & oSettings.Prepared7zArguments & "-t7z -mx" & oSettings.CompressionLevel & " -i@""" & mgrPath.IncludeFileLocation & """ -x@""" & mgrPath.ExcludeFileLocation & """ """ & sBackupFile & """ -r"
prs7z.StartInfo.FileName = oSettings.Utility7zLocation prs7z.StartInfo.FileName = oSettings.Utility7zLocation
prs7z.StartInfo.WorkingDirectory = sSavePath
prs7z.StartInfo.UseShellExecute = False prs7z.StartInfo.UseShellExecute = False
prs7z.StartInfo.RedirectStandardOutput = True prs7z.StartInfo.RedirectStandardOutput = True
prs7z.StartInfo.CreateNoWindow = True prs7z.StartInfo.CreateNoWindow = True