diff --git a/IO/LocalStore.cs b/IO/LocalStore.cs index f0fd036..7395d5b 100644 --- a/IO/LocalStore.cs +++ b/IO/LocalStore.cs @@ -29,6 +29,9 @@ public class LocalStore : IStore using (FileStream fs = new FileStream(this.filePath, FileMode.OpenOrCreate)) using (StreamWriter writer = new StreamWriter(fs, DefaultEncoding)) { + fs.Seek(0, SeekOrigin.Begin); + fs.SetLength(0); + foreach (T item in this.items) { string json = JsonSerializer.Serialize(item);