summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2016-06-29 21:07:47 -0700
committerMichael Forney <mforney@mforney.org>2016-07-02 21:39:52 -0700
commitf1887cc80e103508d7ca72d36aeeb44d005a899c (patch)
treeb1e83a60f7687cb9aef9d2c5126f494ed68342f6
parentb1ff16464cada3bcaab96bd0a711e655cf8d5640 (diff)
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.
-rw-r--r--util/perms-hook.c2
1 files changed, 1 insertions, 1 deletions
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';