Retries for deleteing .bak video

This commit is contained in:
N00MKRAD
2021-06-10 10:46:02 +02:00
parent 71a1e5f17d
commit 3355cdcab9
3 changed files with 4 additions and 5 deletions

View File

@@ -253,7 +253,6 @@ namespace Flowframes
public ModelCollection.ModelInfo GetModel(AI currentAi)
{
//return aiModel.Text.Split('-')[0].Remove(" ").Remove(".");
return AiModels.GetModels(currentAi).models[aiModel.SelectedIndex];
}

View File

@@ -153,9 +153,6 @@ namespace Flowframes.IO
public static bool AreFilesValid (string ai, string model)
{
if (Debugger.IsAttached) // Disable MD5 check in dev environment
return true;
string mdlDir = GetLocalPath(ai, model);
if (!Directory.Exists(mdlDir))
@@ -164,6 +161,9 @@ namespace Flowframes.IO
return false;
}
if (Debugger.IsAttached) // Disable MD5 check in dev environment
return true;
string md5FilePath = Path.Combine(mdlDir, "md5.txt");
if (!File.Exists(md5FilePath) || IOUtils.GetFilesize(md5FilePath) < 32)

View File

@@ -192,7 +192,7 @@ namespace Flowframes.Main
await MergeChunks(tempConcatFile, outPath, isBackup);
if (!isBackup)
IOUtils.DeleteIfExists(IOUtils.FilenameSuffix(outPath, Paths.backupSuffix));
Task.Run(async () => { await IOUtils.TryDeleteIfExistsAsync(IOUtils.FilenameSuffix(outPath, Paths.backupSuffix)); });
}
}
catch (Exception e)