Skip to content

Commit

Permalink
Release 0.9.9.21 (#609)
Browse files Browse the repository at this point in the history
Fix updater packaging logic
  • Loading branch information
AlexMacocian authored Feb 27, 2024
1 parent d21c55d commit a0ebc87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Daybreak/Daybreak.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<LangVersion>preview</LangVersion>
<ApplicationIcon>Daybreak.ico</ApplicationIcon>
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
<Version>0.9.9.20</Version>
<Version>0.9.9.21</Version>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<UserSecretsId>cfb2a489-db80-448d-a969-80270f314c46</UserSecretsId>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
Expand Down
6 changes: 3 additions & 3 deletions Daybreak/Services/Updater/ApplicationUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ private async Task<bool> DownloadUpdateInternalBlob(List<Metadata> metadata, Ver

using var packageStream = new FileStream("update.pkg", FileMode.Create);
var downloaded = 0d;
var downloadBuffer = new Memory<byte>(new byte[8192]);
var downloadBuffer = new byte[8192];
var sizeToDownload = (double)filesToDownload.Sum(m => m.Size);
var sw = Stopwatch.StartNew();
var lastUpdate = DateTime.Now;
Expand Down Expand Up @@ -318,8 +318,8 @@ private async Task<bool> DownloadUpdateInternalBlob(List<Metadata> metadata, Ver
var fileSize = file.Size;
while (fileSize > 0)
{
var readBytes = await downloadStream.ReadAsync(downloadBuffer);
await packageStream.WriteAsync(downloadBuffer);
var readBytes = await downloadStream.ReadAsync(downloadBuffer, 0, downloadBuffer.Length);
await packageStream.WriteAsync(downloadBuffer, 0, readBytes);

fileSize -= readBytes;
downloaded += readBytes;
Expand Down

0 comments on commit a0ebc87

Please sign in to comment.