mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile, SimpleSort, FileTools] Make sure extensions are checked properly
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user