[DatFile, SimpleSort, FileTools] Make sure extensions are checked properly

This commit is contained in:
Matt Nadareski
2016-09-26 17:36:25 -07:00
parent f7e47d3cac
commit 219d6f7664
3 changed files with 12 additions and 4 deletions

View File

@@ -22,7 +22,11 @@ namespace SabreTools.Helper
{
// Limit the output formats based on extension
string ext = Path.GetExtension(filename).ToLowerInvariant();
if (ext != ".dat" && ext != ".xml")
if (ext.StartsWith("."))
{
ext = ext.Substring(1);
}
if (ext != "dat" && ext != "xml")
{
return 0;
}