Allow creation of backups without specifying 7z arguments
This commit is contained in:
parent
db4cc549f4
commit
b9ecde1340
2 changed files with 5 additions and 1 deletions
|
@ -146,6 +146,10 @@ class Context {
|
|||
return $this.ArchivePath($softwareName);
|
||||
}
|
||||
|
||||
[void] Backup([string]$sourcePath, [string]$archivePath) {
|
||||
$this.Backup($sourcePath, $archivePath, @());
|
||||
}
|
||||
|
||||
[void] Backup([string]$sourcePath, [string]$archivePath, [string[]]$arguments) {
|
||||
if (Test-Path $archivePath) {
|
||||
Remove-Item -Recurse $archivePath;
|
||||
|
|
|
@ -10,7 +10,7 @@ $null = New-Module {
|
|||
$tempDir = $context.GetTempDirectory();
|
||||
$fileName = Join-Path "$tempDir" $configFile;
|
||||
& reg export "HKCU\Software\SimonTatham" "$fileName" /y;
|
||||
$context.Backup($tempDir, $context.SoftwareArchive($softwareName), @());
|
||||
$context.Backup($tempDir, $context.SoftwareArchive($softwareName));
|
||||
Remove-Item -Recurse $tempDir;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue