From 599ddd147c285ac8b723d34149840e4cddf8fb52 Mon Sep 17 00:00:00 2001 From: DismissedLight <1686188646@qq.com> Date: Mon, 22 Jul 2024 14:39:28 +0800 Subject: [PATCH] single threaded update package download 2 --- src/Snap.Hutao/Snap.Hutao/Service/Update/UpdateService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Update/UpdateService.cs b/src/Snap.Hutao/Snap.Hutao/Service/Update/UpdateService.cs index c6cf8ada..c0ba751f 100644 --- a/src/Snap.Hutao/Snap.Hutao/Service/Update/UpdateService.cs +++ b/src/Snap.Hutao/Snap.Hutao/Service/Update/UpdateService.cs @@ -153,6 +153,7 @@ internal sealed partial class UpdateService : IUpdateService StreamCopyWorker worker = new(webStream, fileStream, bytesRead => new UpdateStatus(version, bytesRead, totalBytes)); await worker.CopyAsync(progress).ConfigureAwait(false); + fileStream.SetLength(fileStream.Position); string? remoteHash = versionInformation.Sha256; ArgumentNullException.ThrowIfNull(remoteHash);