Allow addition of custom restoration arguments
This commit is contained in:
parent
c781134141
commit
17a18866f5
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue