commit c2b25ddb63ba2f8ea55da868b611c036d9ecba9d
parent bbce9ca9179b4677c7599caa88591d341f1e2df4
Author: Florian Dold <dold@taler.net>
Date: Tue, 21 Jul 2026 00:40:41 +0200
util: fix glob matching of a trailing wildcard
globMatch never matched a pattern ending in "*", so @inline-matching@ loaded
no files without reporting an error.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/taler-util/src/talerconfig.ts b/packages/taler-util/src/talerconfig.ts
@@ -331,7 +331,8 @@ function globMatch(pattern: string, str: string): boolean {
return false;
}
strPos = strBt + 1;
- if (strPos >= str.length) {
+ // strPos may reach str.length: a trailing "*" matches the empty suffix.
+ if (strPos > str.length) {
return false;
}
patPos = patBt;