From: Michael Tremer Date: Tue, 11 Nov 2025 16:53:29 +0000 (+0000) Subject: file: Support checking more complex parser patterns X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd940eb52fc063c708ae6e89ded85f967008b195;p=collecty.git file: Support checking more complex parser patterns Signed-off-by: Michael Tremer --- diff --git a/src/daemon/file.c b/src/daemon/file.c index 3283a39..6bb04f3 100644 --- a/src/daemon/file.c +++ b/src/daemon/file.c @@ -224,6 +224,22 @@ static unsigned int td_file_check_pattern(td_file* self, const char* s) { while (*p) { switch (*p++) { case '%': + // Check the following character + switch (*p) { + // %% simply escapes a single % + case '%': + p++; + continue; + + // Skip %*d, because we won't store the value + case '*': + p++; + continue; + + default: + break; + } + counter++; break;