range: Use `type` metakey as fallback for `check/type`
@@ -404,6 +404,14 @@ static RangeType stringToType (const Key * typeMeta)
static RangeType getType (const Key * key)
{
const Key * typeMeta = keyGetMeta (key, "check/type");
+
+ // If "check/type" is not specified, fall back to "type.
+ // As decided in https://github.com/ElektraInitiative/libelektra/issues/3984#issuecomment-909144492
+ if (typeMeta == NULL)
+ {
+ typeMeta = keyGetMeta (key, "type");
+ }
+
RangeType type = stringToType (typeMeta);
if (type == NA)
