added warning about incompatible filetype extensions

This commit is contained in:
mazunki 2021-12-31 06:23:54 +01:00
parent 4a1887d28b
commit ec095b946f

View file

@ -51,7 +51,12 @@ namespace NBTExplorer.Model
public static bool SupportedNamePattern (string path) public static bool SupportedNamePattern (string path)
{ {
path = Path.GetFileName(path); path = Path.GetFileName(path);
return _namePattern.IsMatch(path); if (_namePattern.IsMatch(path)) {
return true;
} else {
Console.WriteLine("File doesn't have the appropriate extension: '{0}'", path);
return false;
}
} }
protected override NodeCapabilities Capabilities protected override NodeCapabilities Capabilities