On Thu, May 09, 2024 at 14:28:15 +0200, Peter Krempa wrote:
On Thu, May 02, 2024 at 19:39:41 +0200, Andrea Bolognani wrote:
[...]
foreach override in overrides:
pc = canonicalize(path);
po = canonicalize(override);
if (STRPREFIX(pc, po))
return true;
Checking the full prefix on canonicalized paths is IIUC equivalent to
what you do below. (Okay perhaps except the case when user declares a
full to a single file as an exported override).
To take the above into account we can perhaps do STRSKIP:
if ((tmp = STRSKIP(pc, po))) {
if (*tmp == '/' || *tmp == '\0)
return true;
}