From f1887cc80e103508d7ca72d36aeeb44d005a899c Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Wed, 29 Jun 2016 21:07:47 -0700 Subject: perms-hook: Fix parent directory scan Previously, if there was an earlier directory that was identical apart from a longer name, its permissions were not updated. --- util/perms-hook.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/perms-hook.c b/util/perms-hook.c index a3f5a6dc..840fe142 100644 --- a/util/perms-hook.c +++ b/util/perms-hook.c @@ -307,7 +307,7 @@ readchanges(char *old, char *new) if (lines[!cur].buf) for (s = lines[!cur].buf; *s && *s == *diff; ++s, ++diff); /* set permissions on each parent directory after that difference */ - for (s = path + n; s > diff; --s) { + for (s = path + n; s >= diff; --s) { if (*s != '/') continue; *s = '\0'; -- cgit v1.2.3