From c7b77e4bd79d83b4ae0d61d55f9c25abf1b41ef3 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 19 Jul 2025 12:36:03 -0400 Subject: [PATCH] Reduce preprocessing in DumpEnvironment --- CHANGELIST.md | 1 + MPF.Frontend/DumpEnvironment.cs | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 76e16651..70571438 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -5,6 +5,7 @@ - UI consistency when parameters are editable - Let the processor always deal with unsupported - Put a try/catch around GenerateArtifacts +- Reduce preprocessing in DumpEnvironment ### 3.3.3 (2025-07-18) diff --git a/MPF.Frontend/DumpEnvironment.cs b/MPF.Frontend/DumpEnvironment.cs index 0d44f42a..d6b0917e 100644 --- a/MPF.Frontend/DumpEnvironment.cs +++ b/MPF.Frontend/DumpEnvironment.cs @@ -486,14 +486,6 @@ namespace MPF.Frontend // Determine the media type from the processor MediaType? mediaType = _processor.DetermineMediaType(outputDirectory, outputFilename); - // Check to make sure that the output had all the correct files - List missingFiles = _processor.FoundAllFiles(mediaType, outputDirectory, outputFilename); - if (missingFiles.Count > 0) - { - resultProgress.Report(ResultEventArgs.Failure($"There were files missing from the output:\n{string.Join("\n", [.. missingFiles])}")); - return ResultEventArgs.Failure("Error! Please check output directory as dump may be incomplete!"); - } - // Extract the information from the output files resultProgress.Report(ResultEventArgs.Success("Extracting output information from output files...")); var submissionInfo = await SubmissionGenerator.ExtractOutputInformation( @@ -505,7 +497,15 @@ namespace MPF.Frontend _processor, resultProgress, protectionProgress); - resultProgress.Report(ResultEventArgs.Success("Extracting information complete!")); + if (submissionInfo == null) + { + resultProgress.Report(ResultEventArgs.Failure("There was an issue extracting information!")); + return ResultEventArgs.Failure(); + } + else + { + resultProgress.Report(ResultEventArgs.Success("Extracting information complete!")); + } // Inject seed submission info data, if necessary if (seedInfo != null)