Skip to content

Commit c83ced1

Browse files
committed
fix: should use File.Create instead of File.OpenWrite
Signed-off-by: leo <[email protected]>
1 parent aa803c3 commit c83ced1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Commands/SaveRevisionFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private static async Task ExecCmdAsync(string repo, string args, string outputFi
3838
starter.RedirectStandardOutput = true;
3939
starter.RedirectStandardError = true;
4040

41-
await using (var sw = File.OpenWrite(outputFile))
41+
await using (var sw = File.Create(outputFile))
4242
{
4343
try
4444
{

src/Models/AvatarManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void Start()
8989
{
9090
using (var stream = rsp.Content.ReadAsStream())
9191
{
92-
using (var writer = File.OpenWrite(localFile))
92+
using (var writer = File.Create(localFile))
9393
{
9494
stream.CopyTo(writer);
9595
}

src/ViewModels/Repository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ public void Close()
548548

549549
try
550550
{
551-
using var stream = File.OpenWrite(Path.Combine(_gitDir, "sourcegit.settings"));
551+
using var stream = File.Create(Path.Combine(_gitDir, "sourcegit.settings"));
552552
JsonSerializer.Serialize(stream, _settings, JsonCodeGen.Default.RepositorySettings);
553553
}
554554
catch

0 commit comments

Comments
 (0)