remove exisiting results.
This commit is contained in:
parent
30b29aa25c
commit
fea0ecf17b
@ -160,6 +160,8 @@ public class Pathfinder
|
|||||||
|
|
||||||
public void SaveResult(string path)
|
public void SaveResult(string path)
|
||||||
{
|
{
|
||||||
|
if(File.Exists(path))
|
||||||
|
File.Delete(path);
|
||||||
FileStream fs = new (path, FileMode.CreateNew);
|
FileStream fs = new (path, FileMode.CreateNew);
|
||||||
JsonSerializer.Serialize(fs, pathResult, JsonSerializerOptions.Default);
|
JsonSerializer.Serialize(fs, pathResult, JsonSerializerOptions.Default);
|
||||||
fs.Dispose();
|
fs.Dispose();
|
||||||
|
Reference in New Issue
Block a user