summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-11-05 11:02:27 -0500
committerTavian Barnes <tavianator@tavianator.com>2017-11-05 11:02:27 -0500
commit7f8bacca4c2b1d35bb65ddf8cbf70fadf1adf66e (patch)
tree54d1ba2f4f1cbe4a4465b87053bf229909a500c9 /parse.c
parent3c02f3290804acedfc922ae82ce2a3aca5ca2ec7 (diff)
downloadbfs-7f8bacca4c2b1d35bb65ddf8cbf70fadf1adf66e.tar.xz
parse: Support -perm +7777, for compatibility with BSD and old GNU find
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 2708b9a..6492412 100644
--- a/parse.c
+++ b/parse.c
@@ -1795,6 +1795,12 @@ static struct expr *parse_perm(struct parser_state *state, int field, int arg2)
expr->mode_cmp = MODE_ANY;
++mode;
break;
+ case '+':
+ if (mode[1] >= '0' && mode[1] <= '9') {
+ expr->mode_cmp = MODE_ANY;
+ ++mode;
+ }
+ break;
default:
expr->mode_cmp = MODE_EXACT;
break;