diff --git a/SabreTools.Library/Tools/FileTools.cs b/SabreTools.Library/Tools/FileTools.cs index cc396506..832bede1 100644 --- a/SabreTools.Library/Tools/FileTools.cs +++ b/SabreTools.Library/Tools/FileTools.cs @@ -68,7 +68,7 @@ namespace SabreTools.Library.Tools return 0; } - // Some formats only require the extension to know + // Some formats should only require the extension to know if (ext == "md5") { return DatFormat.RedumpMD5; @@ -93,6 +93,14 @@ namespace SabreTools.Library.Tools { return DatFormat.RedumpSHA512; } + if (ext == "csv") + { + return DatFormat.CSV; + } + if (ext == "tsv") + { + return DatFormat.TSV; + } // For everything else, we need to read it try @@ -152,14 +160,6 @@ namespace SabreTools.Library.Tools { return DatFormat.AttractMode; } - else if (first.Contains("\"File Name\",\"Internal Name\",\"Description\"")) - { - return DatFormat.CSV; - } - else if (first.Contains("\"File Name\"\t\"Internal Name\"\t\"Description\"")) - { - return DatFormat.TSV; - } else { return DatFormat.ClrMamePro;