diff --git a/scripts/Windows/OS/Manage.ps1 b/scripts/Windows/OS/Manage.ps1 index b9597d2f..589d35b3 100644 --- a/scripts/Windows/OS/Manage.ps1 +++ b/scripts/Windows/OS/Manage.ps1 @@ -50,11 +50,7 @@ function Invoke-WindowsRestore([Context] $context) { $context.BackupName ??= "PortValhalla"; $context.RootDir = $context.GetTempDirectory(); - if (-not $backupPath) - { - New-Item -ItemType Directory $context.BackupRoot(); - } - else + if ($backupPath) { $context.Restore($backupPath, $context.BackupRoot()); }