remove exisiting results.

This commit is contained in:
glax 2023-04-23 16:02:55 +02:00
parent 30b29aa25c
commit fea0ecf17b

View File

@ -160,6 +160,8 @@ public class Pathfinder
public void SaveResult(string path)
{
if(File.Exists(path))
File.Delete(path);
FileStream fs = new (path, FileMode.CreateNew);
JsonSerializer.Serialize(fs, pathResult, JsonSerializerOptions.Default);
fs.Dispose();