From 17a18866f517fb3ea559545d635d34edbac120cd Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 24 Mar 2024 18:08:54 +0100 Subject: [PATCH] Allow addition of custom restoration arguments --- scripts/Windows/Scripts/Context.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index dda31b22..83581d13 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -178,6 +178,10 @@ class Context { } [void] Restore([string]$archivePath, [string]$destinationPath) { + $this.Restore($archivePath, $destinationPath, @()); + } + + [void] Restore([string]$archivePath, [string]$destinationPath, [string[]] $arguments) { if (-not (Test-Path -PathType Leaf $archivePath)) { $archivePath = "$archivePath.001"; } @@ -197,7 +201,7 @@ class Context { Start-Process -WorkingDirectory "$destinationPath" ` -FilePath "7z" ` - -ArgumentList @("x", "$archivePath") ` + -ArgumentList @("x", "$archivePath") + $arguments ` -Wait ` -NoNewWindow; }