diff options
| author | Michael Forney <mforney@mforney.org> | 2016-06-26 01:28:21 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2016-06-26 01:28:21 -0700 |
| commit | 0a12fad92f37d866f962ee960af6dfad295f6818 (patch) | |
| tree | f9ffd08ffa28c22b301b54e897370483d05f8cfe | |
| parent | f68e38cdc302512a7c44a7c419bcea397d3f78a2 (diff) | |
perms-hook: Fix bug with specialperms comparisons
| -rw-r--r-- | util/perms-hook.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/perms-hook.c b/util/perms-hook.c index 044d6ff0..a3f5a6dc 100644 --- a/util/perms-hook.c +++ b/util/perms-hook.c @@ -224,12 +224,12 @@ specialperms(void) /* process in reverse order so that directory removals can succeed */ while (i >= 0 || j >= 0) { if (i < 0) - n = 1; - else if (j < 0) n = -1; + else if (j < 0) + n = 1; else n = strcmp(oldsp.perms[i].name, newsp.perms[j].name); - if (n >= 0) { + if (n <= 0) { if (specialperm(&newsp.perms[j]) < 0 && errno != EXDEV) error("specialperm:"); --j; |
