diff --git a/.Source/GTweak/Utilities/Settings.cs b/.Source/GTweak/Utilities/Settings.cs index 396601d8..33ebd432 100644 --- a/.Source/GTweak/Utilities/Settings.cs +++ b/.Source/GTweak/Utilities/Settings.cs @@ -193,7 +193,7 @@ internal static void SelfRemoval() Process.Start(new ProcessStartInfo() { - Arguments = $"/c taskkill /f /im {currentName} & choice /c y /n /d y /t 3 & del {new FileInfo(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath).Name } & " + + Arguments = $"/c taskkill /f /im {currentName} & choice /c y /n /d y /t 3 & del {new FileInfo(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath).Name} & " + @$"rd /s /q {UsePath.FileLocation} & rd /s /q {Environment.SystemDirectory}\config\systemprofile\AppData\Local\GTweak", WindowStyle = ProcessWindowStyle.Hidden, CreateNoWindow = true, diff --git a/.Source/GTweak/Utilities/Tweaks/SystemData.cs b/.Source/GTweak/Utilities/Tweaks/SystemData.cs index a9bea364..19991660 100644 --- a/.Source/GTweak/Utilities/Tweaks/SystemData.cs +++ b/.Source/GTweak/Utilities/Tweaks/SystemData.cs @@ -5,11 +5,9 @@ using System.Diagnostics; using System.Globalization; using System.IO; -using System.Linq; using System.Management; using System.Net; using System.Net.Http; -using System.Reflection; using System.Runtime.InteropServices; using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -342,7 +340,8 @@ internal void CheckingUpdate() string DataAsJson = sreader.ReadToEnd(); GitVersionUtility gitVersionUtility = JsonConvert.DeserializeObject(DataAsJson); - if (!string.IsNullOrEmpty(gitVersionUtility.СurrentVersion) && (Assembly.GetEntryAssembly() ?? throw new InvalidOperationException()).GetCustomAttribute().InformationalVersion.Split(' ').Last().Trim() != gitVersionUtility.СurrentVersion) + + if (!string.IsNullOrEmpty(gitVersionUtility.СurrentVersion) && gitVersionUtility.СurrentVersion.CompareTo(Settings.currentRelease) > 0) { IsNeedUpdate = true; DownloadVersion = gitVersionUtility.СurrentVersion;