[FileTools] CSV/TSV should be extension alone

This commit is contained in:
Matt Nadareski
2017-05-10 15:13:49 -07:00
parent c68e6dbc8d
commit 524a1f097f

View File

@@ -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;