Skip to content

find: reject the deprecated -perm +MODE octal form to match GNU - #851

Open
AlejandroCoronadoN wants to merge 1 commit into
uutils:mainfrom
AlejandroCoronadoN:perm-plus-octal-reject
Open

find: reject the deprecated -perm +MODE octal form to match GNU#851
AlejandroCoronadoN wants to merge 1 commit into
uutils:mainfrom
AlejandroCoronadoN:perm-plus-octal-reject

Conversation

@AlejandroCoronadoN

Copy link
Copy Markdown
Contributor

GNU find rejects the deprecated -perm +MODE octal form (a leading + followed by an octal number). uutils silently accepts it: the + is treated as an unknown prefix, so it falls through to an exact numeric comparison and matches files instead of erroring.

$ find . -perm +644 ; echo $?
./f          # wrongly matches
0
$ gfind . -perm +644 ; echo $?
gfind: invalid file mode '+644'
1

Same for +0 and +400. Symbolic forms (+rwx, +u+w) and the 644 / /644 / -644 forms are unaffected. This rejects a leading + followed by a digit, matching GNU.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.29%. Comparing base (955282d) to head (ac5998b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #851   +/-   ##
=======================================
  Coverage   92.29%   92.29%           
=======================================
  Files          35       35           
  Lines        7445     7450    +5     
  Branches      388      389    +1     
=======================================
+ Hits         6871     6876    +5     
  Misses        433      433           
  Partials      141      141           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Aug 21, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks


Comparing AlejandroCoronadoN:perm-plus-octal-reject (ac5998b) with main (955282d)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant