diff --git a/Ryujinx.Updater/Program.cs b/Ryujinx.Updater/Program.cs index 789c58cbd5..6e35dffff3 100644 --- a/Ryujinx.Updater/Program.cs +++ b/Ryujinx.Updater/Program.cs @@ -56,9 +56,7 @@ namespace Ryujinx.Updater return; } - Console.WriteLine($"Updating Ryujinx... | {File.ReadAllText(Path.Combine(localAppPath, "Version.json"))} -> {args[1]}"); - - File.WriteAllText(Path.Combine(localAppPath, "Version.json"), args[1]); + Console.WriteLine($"Updating Ryujinx..."); // Create temp directory diff --git a/Ryujinx/Updater/UpdateParser.cs b/Ryujinx/Updater/UpdateParser.cs index e6baf1f354..b79586724c 100644 --- a/Ryujinx/Updater/UpdateParser.cs +++ b/Ryujinx/Updater/UpdateParser.cs @@ -66,23 +66,24 @@ namespace Ryujinx // Get Version.json to compare versions - if (File.Exists(Path.Combine(localAppPath, "Version.json"))) + if (File.Exists(Path.Combine(Environment.CurrentDirectory, "Version.json"))) { try { string currentVersionJson; string currentVersionBranch; string currentVersionPr; - var VersionJSON = JObject.Parse(Path.Combine(Environment.CurrentDirectory, "Version.json")); - var _JRoot = VersionJSON[0]; - currentVersionJson = (string)_JRoot["BuildVer"]; - currentVersionPr = (string)_JRoot["BuildPR"]; - currentVersionBranch = (string)_JRoot["BuildBranch"]; - + + JObject VersionJSON = JObject.Parse(File.ReadAllText(Path.Combine(Environment.CurrentDirectory, "Version.json"))); + + currentVersionJson = (string)VersionJSON["BuildVer"]; + currentVersionPr = (string)VersionJSON["BuildPR"]; + currentVersionBranch = (string)VersionJSON["BuildBranch"]; + Version newVersion = Version.Parse(_buildVer); Version currentVersion = Version.Parse(currentVersionJson); - if (newVersion.CompareTo(currentVersion) == 0) + if (newVersion < currentVersion) { GtkDialog.CreateInfoDialog("Update", "Ryujinx - Updater", "You are already using the most updated version of Ryujinx!", "");