Slight rename for readability

This commit is contained in:
Matt Nadareski
2025-01-12 21:30:21 -05:00
parent 5ce5d6da89
commit c8fda8d99d

View File

@@ -97,9 +97,9 @@ namespace SabreTools.DatFiles
: datFile.Header.GetStringFieldValue(DatHeader.FileNameKey)); : datFile.Header.GetStringFieldValue(DatHeader.FileNameKey));
// If the output type isn't set already, get the internal output type // If the output type isn't set already, get the internal output type
DatFormat currentPathFormat = GetDatFormat(currentPath); DatFormat datFormat = GetDatFormat(currentPath);
datFile.Header.SetFieldValue<DatFormat>(DatHeader.DatFormatKey, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey) == 0 datFile.Header.SetFieldValue<DatFormat>(DatHeader.DatFormatKey, datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey) == 0
? currentPathFormat ? datFormat
: datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey)); : datFile.Header.GetFieldValue<DatFormat>(DatHeader.DatFormatKey));
datFile.Items.SetBucketedBy(ItemKey.CRC); // Setting this because it can reduce issues later datFile.Items.SetBucketedBy(ItemKey.CRC); // Setting this because it can reduce issues later
@@ -108,7 +108,7 @@ namespace SabreTools.DatFiles
// Now parse the correct type of DAT // Now parse the correct type of DAT
try try
{ {
DatFile parsingDatFile = DatFileTool.CreateDatFile(currentPathFormat, datFile); DatFile parsingDatFile = DatFileTool.CreateDatFile(datFormat, datFile);
parsingDatFile.ParseFile(currentPath, indexId, keep, statsOnly: statsOnly, throwOnError: throwOnError); parsingDatFile.ParseFile(currentPath, indexId, keep, statsOnly: statsOnly, throwOnError: throwOnError);
} }
catch (Exception ex) when (!throwOnError) catch (Exception ex) when (!throwOnError)