From e79382186efc5b4cfbf43dd0dd84533f61054b59 Mon Sep 17 00:00:00 2001 From: amd64fox Date: Thu, 21 Jul 2022 04:57:15 +0300 Subject: [PATCH] Fix error in condition - Fix error in condition when restoring files in reinstallation of Spicetify --- Install.ps1 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index 4905a9e..c9c4586 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -1073,16 +1073,14 @@ if (Test-Path $xpui_js_patch) { if ($ru) { $test_xpui_ru_bak = Test-Path -Path $xpui_ru_bak_patch } $test_spotify_exe_bak = Test-Path -Path $spotify_exe_bak_patch - if ($test_xpui_js_bak -or $test_xpui_css_bak) { + if ($test_xpui_js_bak -and $test_xpui_css_bak) { + + Remove-Item $xpui_js_patch -Recurse -Force + Rename-Item $xpui_js_bak_patch $xpui_js_patch + + Remove-Item $xpui_css_patch -Recurse -Force + Rename-Item $xpui_css_bak_patch $xpui_css_patch - if ($test_xpui_js_bak) { - Remove-Item $xpui_js_patch -Recurse -Force - Rename-Item $xpui_js_bak_patch $xpui_js_patch - } - if ($test_xpui_css_bak) { - Remove-Item $xpui_css_patch -Recurse -Force - Rename-Item $xpui_css_bak_patch $xpui_css_patch - } if ($test_xpui_lic_bak) { Remove-Item $xpui_lic_patch -Recurse -Force Rename-Item $xpui_lic_bak_patch $xpui_lic_patch