Change location of Extra INI ROOT_FOLDER remap

This commit is contained in:
Matt Nadareski
2020-09-21 10:53:23 -07:00
parent 4e2897dd1c
commit 07066c2299
2 changed files with 6 additions and 4 deletions

View File

@@ -784,10 +784,6 @@ namespace SabreTools.Library.DatFiles
string key = mapping.Key;
List<string> machineNames = mapping.Value;
// If we have the root folder, assume boolean
if (string.Equals(key, "ROOT_FOLDER"))
key = "true";
// Loop through the machines and add the new mappings
foreach (string machine in machineNames)
{

View File

@@ -76,6 +76,12 @@ namespace SabreTools.Library.Filtering
string key = ir.Section;
string value = ir.Line.Trim();
// If the section is "ROOT_FOLDER", then we use the value "true" instead.
// This is done because some INI files use the name of the file as the
// category to be assigned to the items included.
if (key == "ROOT_FOLDER")
key = "true";
// Ensure the key exists
if (!Mappings.ContainsKey(key))
Mappings[key] = new List<string>();