Ignore unspecified backup archives

This commit is contained in:
Manuel Thalmann 2024-08-28 00:22:38 +02:00
parent cddf06a9d3
commit bf51308c30

View file

@ -76,6 +76,7 @@ $null = New-Module {
[string[]] $Exclude
)
if ($env:BACKUP_ARCHIVE) {
[List[string]] $argumentList = @();
$dir = New-TemporaryDirectory;
$targetPath = & $pathResolver @PSBoundParameters;
@ -118,6 +119,7 @@ $null = New-Module {
Remove-Item -Recurse -Force $dir;
}
}
<#
.SYNOPSIS
@ -144,6 +146,7 @@ $null = New-Module {
[string[]] $ArgumentList
)
if ($env:BACKUP_ARCHIVE) {
$dir = New-TemporaryDirectory;
$sourcePath = & $pathResolver @PSBoundParameters;
$filePath = Join-Path $dir $sourcePath;
@ -155,4 +158,5 @@ $null = New-Module {
Remove-Item -Recurse -Force $dir;
}
}
};