From 438c7309eec97328d3bf929bb31b707c4102dcdf Mon Sep 17 00:00:00 2001 From: FenPhoenix Date: Sat, 19 Aug 2023 23:04:12 -0700 Subject: [PATCH] Update FMInfoGen for the previous --- FMScanner/Core/Scanner.cs | 8 ++++---- TestApps/FMInfoGen/FMInfoGen/FMScan.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/FMScanner/Core/Scanner.cs b/FMScanner/Core/Scanner.cs index d3084b9d5..8f0de4d91 100644 --- a/FMScanner/Core/Scanner.cs +++ b/FMScanner/Core/Scanner.cs @@ -284,19 +284,19 @@ public Scanner(string sevenZipWorkingPath, string sevenZipExePath) [PublicAPI] public ScannedFMDataAndError - Scan(string mission, string tempPath, bool forceFullIfNew) + Scan(string mission, string tempPath, bool forceFullIfNew, string name) { return ScanMany( - new List { new(path: mission, forceFullScan: forceFullIfNew) }, + new List { new(path: mission, forceFullScan: forceFullIfNew, displayName: name) }, tempPath, _scanOptions, null, CancellationToken.None)[0]; } [PublicAPI] public ScannedFMDataAndError - Scan(string mission, string tempPath, ScanOptions scanOptions, bool forceFullIfNew) + Scan(string mission, string tempPath, ScanOptions scanOptions, bool forceFullIfNew, string name) { return ScanMany( - new List { new(path: mission, forceFullScan: forceFullIfNew) }, + new List { new(path: mission, forceFullScan: forceFullIfNew, name) }, tempPath, scanOptions, null, CancellationToken.None)[0]; } diff --git a/TestApps/FMInfoGen/FMInfoGen/FMScan.cs b/TestApps/FMInfoGen/FMInfoGen/FMScan.cs index 53be96401..84bbf78fc 100644 --- a/TestApps/FMInfoGen/FMInfoGen/FMScan.cs +++ b/TestApps/FMInfoGen/FMInfoGen/FMScan.cs @@ -78,13 +78,13 @@ private static void WriteYaml(bool zips, string path, List FMsToScan, ScanOptions ScanOptions) - GetScanData(bool zips) + GetScanData(bool zips) { var fmsList = (zips ? Core.View.GetFMArchives() - .Select(static f => new FMToScan(path: Path.Combine(Config.FMsPath, f), false)) + .Select(static f => new FMToScan(path: Path.Combine(Config.FMsPath, f), false, f)) : Directory.GetDirectories(Paths.CurrentExtractedDir, "*", SearchOption.TopDirectoryOnly) - .Select(static f => new FMToScan(path: f, false))) + .Select(static f => new FMToScan(path: f, false, f))) .ToList(); string yamlPath = GetYamlPath(zips); @@ -212,7 +212,7 @@ internal static void ScanFM(string item, bool zip, string? yamlPathOverride = nu string fmPath = zip ? Path.Combine(Config.FMsPath, item) : Path.Combine(Paths.CurrentExtractedDir, item); - fmData = scanner.Scan(fmPath, Core.View.GetTempPath(), scanOptions, false); + fmData = scanner.Scan(fmPath, Core.View.GetTempPath(), scanOptions, false, item); } if (fmData.ScannedFMData == null) return;