Delete old vfr files whenever making a new one

This commit is contained in:
N00MKRAD
2021-02-08 21:11:25 +01:00
parent 4048d2f74c
commit 76886c6b6e
3 changed files with 7 additions and 3 deletions

View File

@@ -19,8 +19,12 @@ namespace Flowframes.Main
public static async Task CreateFrameOrderFile(string framesPath, bool loopEnabled, float times)
{
Logger.Log("Generating frame order information...");
try
{
foreach (FileInfo file in IOUtils.GetFileInfosSorted(framesPath.GetParentDir(), false, $"{Paths.frameOrderPrefix}*.*"))
file.Delete();
benchmark.Restart();
await CreateEncFile(framesPath, loopEnabled, times, false);
Logger.Log($"Generating frame order information... Done.", false, true);