From 0b50a453361b7e30efd20d2294be171e54d50b52 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Sat, 9 Apr 2016 22:15:04 +0200 Subject: [PATCH] Checking update does not depend on old binary removal error --- ArchiSteamFarm/Program.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ArchiSteamFarm/Program.cs b/ArchiSteamFarm/Program.cs index 3ed41309f..436023191 100644 --- a/ArchiSteamFarm/Program.cs +++ b/ArchiSteamFarm/Program.cs @@ -95,8 +95,7 @@ namespace ArchiSteamFarm { File.Delete(oldExeFile); } catch (Exception e) { Logging.LogGenericException(e); - Logging.LogGenericError("Could not remove old ASF file, please remove " + oldExeFile + " manually in order for update function to work"); - return; + Logging.LogGenericError("Could not remove old ASF binary, please remove " + oldExeFile + " manually in order for update function to work!"); } } @@ -174,6 +173,11 @@ namespace ArchiSteamFarm { return; } + if (File.Exists(oldExeFile)) { + Logging.LogGenericWarning("Refusing to proceed with auto update as old " + oldExeFile + " binary could not be removed, please remove it manually"); + return; + } + // Auto update logic starts here if (releaseResponse.Assets == null) { Logging.LogGenericWarning("Could not proceed with update because that version doesn't include assets!");