From a72b3c32b16cbf00e3ac7ad2eeda8283dc26bbc1 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 6 Oct 2022 10:04:56 -0700 Subject: [PATCH] Report specific DIC version, if possible --- CHANGELIST.md | 1 + MPF.Modules/DiscImageCreator/Parameters.cs | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 3aba2386..88531998 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -132,6 +132,7 @@ - Use default directory for folder browsing, if possible - Add unused command filename parser - Add initial framework for reporting dumping program +- Report specific DIC version, if possible ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF.Modules/DiscImageCreator/Parameters.cs b/MPF.Modules/DiscImageCreator/Parameters.cs index 87cd10fa..2f602fe5 100644 --- a/MPF.Modules/DiscImageCreator/Parameters.cs +++ b/MPF.Modules/DiscImageCreator/Parameters.cs @@ -375,8 +375,9 @@ namespace MPF.Modules.DiscImageCreator { string outputDirectory = Path.GetDirectoryName(basePath); - // TODO: Get the DiscImageCreator version - info.CommonDiscInfo.DumpingProgram = EnumConverter.LongName(this.InternalProgram); + // Get the dumping program and version + (_, string dicVersion) = GetCommandFilePathAndVersion(basePath); + info.CommonDiscInfo.DumpingProgram = $"{EnumConverter.LongName(this.InternalProgram)} {dicVersion ?? "Unknown Version"}"; // Fill in the hash data info.TracksAndWriteOffsets.ClrMameProData = GetDatfile($"{basePath}.dat"); @@ -1489,9 +1490,7 @@ namespace MPF.Modules.DiscImageCreator /// public override List GetLogFilePaths(string basePath) { - string parentDirectory = Path.GetDirectoryName(basePath); - var currentFiles = Directory.GetFiles(parentDirectory); - string cmdPath = currentFiles.FirstOrDefault(f => Regex.IsMatch(f, @"\d{8}T\d{6}")); + (string cmdPath, _) = GetCommandFilePathAndVersion(basePath); List logFiles = new List(); switch (this.Type)