From ec095b946f87b953e06dd2f2ff6118b18f0876a1 Mon Sep 17 00:00:00 2001 From: mazunki Date: Fri, 31 Dec 2021 06:23:54 +0100 Subject: [PATCH] added warning about incompatible filetype extensions --- NBTModel/Data/Nodes/NbtFileDataNode.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/NBTModel/Data/Nodes/NbtFileDataNode.cs b/NBTModel/Data/Nodes/NbtFileDataNode.cs index 866d812..83ac368 100644 --- a/NBTModel/Data/Nodes/NbtFileDataNode.cs +++ b/NBTModel/Data/Nodes/NbtFileDataNode.cs @@ -51,7 +51,12 @@ namespace NBTExplorer.Model public static bool SupportedNamePattern (string 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