diff --git a/bids-validator/src/validators/filenameIdentify.ts b/bids-validator/src/validators/filenameIdentify.ts index 033e37b4e..78dd0213a 100644 --- a/bids-validator/src/validators/filenameIdentify.ts +++ b/bids-validator/src/validators/filenameIdentify.ts @@ -129,13 +129,10 @@ export function hasMatch(schema, context) { const entExtMatch = context.filenameRules.filter((rulePath) => { return entitiesExtensionsInRule(schema, context, rulePath) }) - if (entExtMatch.length > 0) { - context.filenameRules = [entExtMatch[0]] + if (entExtMatch.length == 1) { + context.filenameRules = entExtMatch } } - /* If we end up with multiple rules we should generate an error? */ - if (context.filenameRules.length > 1) { - } return Promise.resolve() }