From 53977b247d6831e001a2b3b2442bcdf310a0321d Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 30 Apr 2025 10:44:31 -0400 Subject: [PATCH] Clear format and parse --- SabreTools/Features/Update.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SabreTools/Features/Update.cs b/SabreTools/Features/Update.cs index 0c04c169..0be6acc7 100644 --- a/SabreTools/Features/Update.cs +++ b/SabreTools/Features/Update.cs @@ -463,16 +463,19 @@ namespace SabreTools.Features // Check the current format DatFormat currentFormat = datFile.Header.GetFieldValue(DatHeader.DatFormatKey); #if NET20 || NET35 - bool isSeparatedFile = (currentFormat & DatFormat.CSV) != 0 - || (currentFormat & DatFormat.SSV) != 0 - || (currentFormat & DatFormat.TSV) != 0; + bool isSeparatedFile = (currentFormat & DatFormat.CSV) != 0 + || (currentFormat & DatFormat.SSV) != 0 + || (currentFormat & DatFormat.TSV) != 0; #else bool isSeparatedFile = currentFormat.HasFlag(DatFormat.CSV) || currentFormat.HasFlag(DatFormat.SSV) || currentFormat.HasFlag(DatFormat.TSV); #endif + // Clear format and parse + datFile.Header.RemoveField(DatHeader.DatFormatKey); Parser.ParseInto(datFile, inputPath.CurrentPath, keep: true, keepext: isSeparatedFile); + datFile.Header.SetFieldValue(DatHeader.DatFormatKey, currentFormat); // Perform additional processing steps AdditionalProcessing(datFile);