From 05221f5d8161d5cc0d7b51f5f47cb912fb7afb35 Mon Sep 17 00:00:00 2001 From: YangSpring114 Date: Wed, 14 Aug 2024 13:58:39 +0800 Subject: [PATCH 1/2] Update Launcher.cs --- MinecraftLaunch/Components/Launcher/Launcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MinecraftLaunch/Components/Launcher/Launcher.cs b/MinecraftLaunch/Components/Launcher/Launcher.cs index 3445a98..8b1b9cd 100644 --- a/MinecraftLaunch/Components/Launcher/Launcher.cs +++ b/MinecraftLaunch/Components/Launcher/Launcher.cs @@ -46,7 +46,7 @@ public async ValueTask LaunchAsync(string id) { var process = CreateProcess(arguments, versionPath); LibrariesResolver librariesResolver = new(gameEntry); - await Launcher.ExtractNatives(versionPath, librariesResolver); + await ExtractNatives(versionPath, librariesResolver); return new GameProcessWatcher(process, arguments); } From 7ec2a1efe1e6db2ee967d9da0f42bf0dcd4c3063 Mon Sep 17 00:00:00 2001 From: Ddggdd135 <1306334428@qq.com> Date: Sun, 25 Aug 2024 14:51:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=97=A0=E9=9C=80?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E7=9A=84=E8=B5=84=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MinecraftLaunch/Extensions/DownloadEntryExtension.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MinecraftLaunch/Extensions/DownloadEntryExtension.cs b/MinecraftLaunch/Extensions/DownloadEntryExtension.cs index 5c89d7d..d7c7b84 100644 --- a/MinecraftLaunch/Extensions/DownloadEntryExtension.cs +++ b/MinecraftLaunch/Extensions/DownloadEntryExtension.cs @@ -22,6 +22,9 @@ public static bool Verify(this IDownloadEntry entry) { if(!File.Exists(entry.Path)) return false; + if (entry.Checksum == null) + return true; + using var sha1Provider = SHA1.Create(); using var fileStream = File.OpenRead(entry.Path); byte[] sha1Bytes = sha1Provider.ComputeHash(fileStream);