diff --git a/scripts/Windows/Scripts/Restoration.ps1 b/scripts/Windows/Scripts/Restoration.ps1 index 428da160..f633fa61 100644 --- a/scripts/Windows/Scripts/Restoration.ps1 +++ b/scripts/Windows/Scripts/Restoration.ps1 @@ -157,7 +157,12 @@ $null = New-Module { 7z x "-o$dir" (Get-ValhallaBackupArchive) $sourcePath @ArgumentList; if (Test-Path $filePath) { - Copy-Item -Recurse (Join-Path $dir $sourcePath) $Target; + if (Test-Path -PathType Container $filePath) { + $null = New-Item -ItemType Directory $Target -Force; + $filePath = "$filePath/*"; + } + + Copy-Item -Recurse $filePath $Target -Force; } Remove-Item -Recurse -Force $dir;