From 937acf8eb530445d6acb499d75d0053d54b7d350 Mon Sep 17 00:00:00 2001 From: amd64fox Date: Thu, 21 Jul 2022 21:46:07 +0300 Subject: [PATCH] Del spotify.bak - Deleting a possibly outdated copy of spotify.bak --- Install.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Install.ps1 b/Install.ps1 index b0d8e3e..9ac76ef 100644 --- a/Install.ps1 +++ b/Install.ps1 @@ -1483,8 +1483,10 @@ if ($block_update) { Write-Host ($lang).UpdateBlocked`n } elseif ($old -match "(?<=wg:\/\/desktop-update\/.)2(\/update)") { - Remove-Item $exe_bak -Recurse -Force - Start-Sleep -Milliseconds 150 + if (Test-Path -LiteralPath $exe_bak) { + Remove-Item $exe_bak -Recurse -Force + Start-Sleep -Milliseconds 150 + } copy-Item $exe $exe_bak $new = $old -replace "(?<=wg:\/\/desktop-update\/.)2(\/update)", '7/update' [IO.File]::WriteAllText($exe, $new, $ANSI)