From b4dd114ba408b895ee066286e0d74bf94290c517 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 22 Jun 2023 18:40:01 +0200 Subject: [PATCH] Remove unnecessary code --- scripts/Windows/OS/Manage.ps1 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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()); }