summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-11-21 14:53:24 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-11-21 14:53:24 -0500
commitf80e6b781d1b98f4b50ed4b235edd1fb3deae199 (patch)
tree1206ed4d348e86e9fc43204fc13e1624810f8bee
parentfc98276e1401366fd91a437af3e7fa5f1471f94e (diff)
downloadbfs-f80e6b781d1b98f4b50ed4b235edd1fb3deae199.tar.xz
Support -perm +MODE for symbolic modes.
Only things like -perm +777 are disallowed by GNU find.
-rw-r--r--parse.c4
-rwxr-xr-xtests.sh2
-rw-r--r--tests/test_0092.out0
3 files changed, 1 insertions, 5 deletions
diff --git a/parse.c b/parse.c
index c7092fe..a85390a 100644
--- a/parse.c
+++ b/parse.c
@@ -1446,10 +1446,6 @@ static struct expr *parse_perm(struct parser_state *state, int field, int arg2)
expr->mode_cmp = MODE_ANY;
++mode;
break;
- case '+':
- pretty_error(state->cmdline->stderr_colors,
- "error: -perm +mode is not supported.\n\n");
- goto fail;
default:
expr->mode_cmp = MODE_EXACT;
break;
diff --git a/tests.sh b/tests.sh
index 3d3d10b..eb23d20 100755
--- a/tests.sh
+++ b/tests.sh
@@ -496,7 +496,7 @@ function test_0091() {
}
function test_0092() {
- ! "$BFS" perms -perm +rwx 2>/dev/null
+ bfs_diff perms -perm +rwx
}
function test_0093() {
diff --git a/tests/test_0092.out b/tests/test_0092.out
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/test_0092.out