From a7c87ce37d3f576a26a96d0158157b8a7e195f33 Mon Sep 17 00:00:00 2001 From: Amrsatrio Date: Thu, 26 Oct 2023 00:16:12 +0700 Subject: [PATCH] Setup: Fixed uninstallation of EP installations that have went through upgrades before the proper Pin to Start fix ^2 --- ep_setup/ep_setup.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ep_setup/ep_setup.c b/ep_setup/ep_setup.c index dcf40369d..7706463c0 100644 --- a/ep_setup/ep_setup.c +++ b/ep_setup/ep_setup.c @@ -985,11 +985,14 @@ int WINAPI wWinMain( { bOk = DeleteFileW(wszPath); } - PathRemoveExtensionW(wszPath); - wcscat_s(wszPath, MAX_PATH, L".prev"); - if (FileExistsW(wszPath)) + if (bOk) { - bOk = DeleteFileW(wszPath); + PathRemoveExtensionW(wszPath); + wcscat_s(wszPath, MAX_PATH, L".prev"); + if (FileExistsW(wszPath)) + { + bOk = DeleteFileW(wszPath); + } } if (bOk) {