mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Check for proper filter text, add warning
This commit is contained in:
@@ -310,6 +310,13 @@ namespace SabreTools.Library.DatFiles
|
||||
{
|
||||
foreach (string filterPair in filters)
|
||||
{
|
||||
// If we don't even have a possible filter pair
|
||||
if (!filterPair.Contains(":"))
|
||||
{
|
||||
Globals.Logger.Warning($"'{filterPair}` is not a valid filter string. Valid filter strings are of the form 'key:value'. Please refer to README.1ST or the help feature for more details.");
|
||||
continue;
|
||||
}
|
||||
|
||||
string filterPairTrimmed = filterPair.Trim('"', ' ', '\t');
|
||||
bool negate = filterPairTrimmed.StartsWith("!")
|
||||
|| filterPairTrimmed.StartsWith("~")
|
||||
|
||||
Reference in New Issue
Block a user