Check Redumper dat section for completeness

This commit is contained in:
Matt Nadareski
2023-06-23 11:20:17 -04:00
parent 1dd5542390
commit 8a5475380a
2 changed files with 5 additions and 4 deletions

View File

@@ -78,6 +78,7 @@
- Normalize Redumper CSS outputs
- Normalize multi-instance site tags
- Add missing Aaru error log to zip
- Check Redumper dat section for completeness
### 2.5 (2023-03-12)

View File

@@ -180,10 +180,6 @@ namespace MPF.Modules.Redumper
/// <inheritdoc/>
public override (bool, List<string>) CheckAllOutputFilesExist(string basePath, bool preCheck)
{
// TODO: Also check for incomplete files, if possible
// All files should be generated at the beginning of a dump, so it is difficult to know if anything is missing
// Potentially looking inside of the `log` file, if it exists, would be useful
// Another option could be the presence of the DAT section, since it's not a separate file here
List<string> missingFiles = new List<string>();
switch (this.Type)
@@ -200,6 +196,8 @@ namespace MPF.Modules.Redumper
missingFiles.Add($"{basePath}.fulltoc");
if (!File.Exists($"{basePath}.log"))
missingFiles.Add($"{basePath}.log");
else if (GetDatfile($"{basePath}.log") == null)
missingFiles.Add($"{basePath}.dat");
if (!File.Exists($"{basePath}.state"))
missingFiles.Add($"{basePath}.state");
if (!File.Exists($"{basePath}.subcode"))
@@ -223,6 +221,8 @@ namespace MPF.Modules.Redumper
{
if (!File.Exists($"{basePath}.log"))
missingFiles.Add($"{basePath}.log");
else if (GetDatfile($"{basePath}.log") == null)
missingFiles.Add($"{basePath}.dat");
if (!File.Exists($"{basePath}.manufacturer") && !File.Exists($"{basePath}.1.manufacturer") && !File.Exists($"{basePath}.2.manufacturer"))
missingFiles.Add($"{basePath}.manufacturer");
if (!File.Exists($"{basePath}.physical") && !File.Exists($"{basePath}.physical") && !File.Exists($"{basePath}.1.physical") && !File.Exists($"{basePath}.2.physical"))