Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit a8acf7e

Browse files
committed
Don't overwrite existing file contents.
We need to truncate if file already exists.
1 parent b6050c9 commit a8acf7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/GitHub.VisualStudio/Services/UsageService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ async Task<string> ReadAllTextAsync(string path)
110110

111111
async Task WriteAllTextAsync(string path, string text)
112112
{
113-
using (var s = File.OpenWrite(path))
113+
using (var s = new FileStream(path, FileMode.Create))
114114
using (var w = new StreamWriter(s, Encoding.UTF8))
115115
{
116116
await w.WriteAsync(text);

0 commit comments

Comments
 (0)