Ignore inexistent backup artifacts
This commit is contained in:
parent
f31eed5616
commit
4c11809c49
1 changed files with 6 additions and 1 deletions
|
@ -146,8 +146,13 @@ $null = New-Module {
|
||||||
|
|
||||||
$dir = New-TemporaryDirectory;
|
$dir = New-TemporaryDirectory;
|
||||||
$sourcePath = & $pathResolver @PSBoundParameters;
|
$sourcePath = & $pathResolver @PSBoundParameters;
|
||||||
|
$filePath = Join-Path $dir $sourcePath;
|
||||||
7z x "-o$dir" (Get-ValhallaBackupArchive) $sourcePath @ArgumentList;
|
7z x "-o$dir" (Get-ValhallaBackupArchive) $sourcePath @ArgumentList;
|
||||||
|
|
||||||
|
if (Test-Path $filePath) {
|
||||||
Copy-Item -Recurse (Join-Path $dir $sourcePath) $Target;
|
Copy-Item -Recurse (Join-Path $dir $sourcePath) $Target;
|
||||||
|
}
|
||||||
|
|
||||||
Remove-Item -Recurse -Force $dir;
|
Remove-Item -Recurse -Force $dir;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue