From 1bf045f3e729f39e835bc1a6b3e7f9416a9c5bda Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sun, 19 Jan 2025 15:15:02 +0800 Subject: [PATCH] Make fileMode usage between progress and non-progress paths consistent --- Flow.Launcher.Infrastructure/Http/Http.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/Http/Http.cs b/Flow.Launcher.Infrastructure/Http/Http.cs index 0b5d1b05a..0b3f2be65 100644 --- a/Flow.Launcher.Infrastructure/Http/Http.cs +++ b/Flow.Launcher.Infrastructure/Http/Http.cs @@ -97,7 +97,7 @@ namespace Flow.Launcher.Infrastructure.Http if (canReportProgress && reportProgress != null) { await using var contentStream = await response.Content.ReadAsStreamAsync(token); - await using var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true); + await using var fileStream = new FileStream(filePath, FileMode.CreateNew, FileAccess.Write, FileShare.None, 8192, true); var buffer = new byte[8192]; long totalRead = 0;