Ignore unspecified backup archives
This commit is contained in:
parent
4c11809c49
commit
1c3a2fe2e7
|
@ -76,6 +76,7 @@ $null = New-Module {
|
||||||
[string[]] $Exclude
|
[string[]] $Exclude
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ($env:BACKUP_ARCHIVE) {
|
||||||
[List[string]] $argumentList = @();
|
[List[string]] $argumentList = @();
|
||||||
$dir = New-TemporaryDirectory;
|
$dir = New-TemporaryDirectory;
|
||||||
$targetPath = & $pathResolver @PSBoundParameters;
|
$targetPath = & $pathResolver @PSBoundParameters;
|
||||||
|
@ -118,6 +119,7 @@ $null = New-Module {
|
||||||
|
|
||||||
Remove-Item -Recurse -Force $dir;
|
Remove-Item -Recurse -Force $dir;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
|
@ -144,6 +146,7 @@ $null = New-Module {
|
||||||
[string[]] $ArgumentList
|
[string[]] $ArgumentList
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if ($env:BACKUP_ARCHIVE) {
|
||||||
$dir = New-TemporaryDirectory;
|
$dir = New-TemporaryDirectory;
|
||||||
$sourcePath = & $pathResolver @PSBoundParameters;
|
$sourcePath = & $pathResolver @PSBoundParameters;
|
||||||
$filePath = Join-Path $dir $sourcePath;
|
$filePath = Join-Path $dir $sourcePath;
|
||||||
|
@ -155,4 +158,5 @@ $null = New-Module {
|
||||||
|
|
||||||
Remove-Item -Recurse -Force $dir;
|
Remove-Item -Recurse -Force $dir;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue